/* ==========================================================================
   DrMortgageFinder - Modern Stylesheet
   ========================================================================== */

:root {
  --navy: #09284f;
  --navy2: #061a34;
  --blue: #1261a6;
  --teal: #007f7a;
  --teal-hover: #006f6b;
  --green: #16835d;
  --sky: #eff8fa;
  --ink: #14243a;
  --muted: #5a6b7e;
  --line: #d8e3eb;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(7, 35, 69, 0.14);
  --font-stack: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  color: var(--ink);
  background: #ffffff;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select {
  font: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

/* ==========================================================================
   Top Announcement Notice
   ========================================================================== */

.notice {
  background: var(--navy2);
  color: #e2edf7;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.84rem;
}

.notice b {
  color: #ffffff;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header {
  height: 74px;
  background: #ffffff;
  border-bottom: 1px solid #e5ebf0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-nmls {
  font-size: 0.62rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.cobrand-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  line-height: 1.1;
}

.cobrand-by {
  font-size: 0.58rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.cobrand-logo {
  height: 22px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.cobrand-nmls {
  font-size: 0.58rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.footer-brand-group {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-cobrand {
  border-left: none;
  padding-left: 0;
  align-items: flex-start;
}

.footer-cobrand .cobrand-by,
.footer-cobrand .cobrand-nmls {
  color: #94a3b8;
}

.footer-cobrand .cobrand-logo {
  filter: brightness(0) invert(1);
  opacity: 0.95;
  height: 22px;
}

.footer-brand .brand-nmls {
  color: #94a3b8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--navy);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(9, 40, 79, 0.18);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.brand em {
  font-style: normal;
  color: var(--teal);
}

.brand-name {
  white-space: nowrap;
}

.header-help {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-help small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--teal);
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.header-phone .phone-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: currentColor;
}

.header-phone:hover {
  color: var(--teal-hover);
  text-decoration: underline;
}

.header-cta {
  font-weight: 800;
  color: var(--navy);
  font-size: 1.02rem;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.header-cta:hover {
  color: var(--teal);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  background: linear-gradient(120deg, #f8fcfd 0%, #edf7f8 100%);
  position: relative;
  overflow: hidden;
  padding: 52px 0 58px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background: rgba(0, 156, 149, 0.08);
  top: -240px;
  left: -170px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.84fr);
  gap: 62px;
  align-items: center;
  position: relative;
}

.ad-match {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #c7e1e3;
  color: #087873;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ad-match::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

h1, h2, h3 {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(2.75rem, 5vw, 4.7rem);
  line-height: 1.02;
  margin-top: 19px;
}

h1 span {
  color: var(--teal);
}

.hero-lead {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 625px;
  margin: 21px 0 24px;
}

.hero-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 0 0 25px;
  padding: 0;
  list-style: none;
}

.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 700;
  color: #30465f;
}

.check {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dff4eb;
  color: var(--green);
  display: inline-grid;
  place-items: center;
  font-size: 0.76rem;
  font-style: normal;
  margin-top: 1px;
}

.proof-note {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #dbe7ec;
  padding-top: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.proof-seal {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
}

.proof-note b {
  display: block;
  color: var(--navy);
}

/* ==========================================================================
   Multi-Step Lead Form Card
   ========================================================================== */

.form-card {
  background: #ffffff;
  border: 1px solid #dce6ed;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 27px;
  position: relative;
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  box-shadow: inset 0 4px 0 var(--teal);
  pointer-events: none;
}

.form-top {
  text-align: center;
  padding: 4px 4px 18px;
}

.form-top h2 {
  font-size: 1.62rem;
}

.form-top p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.91rem;
}

.progress-wrap {
  margin: 0 0 22px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: #607184;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 7px;
}

.progress {
  height: 7px;
  background: #e8eef3;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 33.333%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: fade 0.22s ease forwards;
}

@keyframes fade {
  from {
    opacity: 0.3;
    transform: translateX(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.question {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 13px;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  border: 1.5px solid #cedbe4;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  color: #344c65;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.choice input:focus + label {
  outline: 3px solid rgba(0, 127, 122, 0.15);
  outline-offset: 1px;
}

.choice input:checked + label {
  border-color: var(--teal);
  background: #eaf8f7;
  color: #08756f;
  box-shadow: 0 0 0 2px rgba(0, 127, 122, 0.1);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 13px;
}

.field label {
  font-weight: 700;
  color: #34475e;
  font-size: 0.84rem;
}

.field input {
  border: 1.5px solid #ccd9e3;
  border-radius: 10px;
  background: #ffffff;
  padding: 13px;
  min-height: 52px;
  width: 100%;
  color: var(--ink);
  transition: border-color 0.15s ease, outline 0.15s ease;
}

.field input:focus {
  outline: 3px solid rgba(0, 127, 122, 0.13);
  border-color: var(--teal);
}

/* ==========================================================================
   Modern Dropdown / Select Styling
   ========================================================================== */

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.select-wrapper .select-icon {
  position: absolute;
  left: 15px;
  width: 20px;
  height: 20px;
  fill: var(--teal);
  pointer-events: none;
  transition: transform 0.2s ease, fill 0.2s ease;
  z-index: 2;
}

.select-wrapper .select-chevron {
  position: absolute;
  right: 15px;
  width: 18px;
  height: 18px;
  fill: #687e91;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), fill 0.15s ease;
  z-index: 2;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1.5px solid #cedbe4;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px 42px 14px 44px;
  min-height: 54px;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  box-shadow: 0 2px 5px rgba(9, 40, 79, 0.03);
}

.select-wrapper select:hover {
  border-color: #9cbacf;
  background-color: #fbfdff;
  box-shadow: 0 4px 12px rgba(9, 40, 79, 0.06);
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 127, 122, 0.16), 0 4px 14px rgba(0, 127, 122, 0.08);
  background-color: #ffffff;
}

.select-wrapper:focus-within .select-chevron {
  fill: var(--teal);
  transform: rotate(180deg);
}

.select-wrapper:focus-within .select-icon {
  transform: scale(1.08);
}

.select-wrapper select:invalid,
.select-wrapper select:has(option[value=""]:checked) {
  color: #7b8e9f;
  font-weight: 500;
}

.select-wrapper select option {
  color: var(--ink);
  font-weight: 600;
  background: #ffffff;
  padding: 10px;
}

.select-wrapper select option[value=""] {
  color: #8b9baa;
  font-weight: 400;
}

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

.full {
  grid-column: 1 / -1;
}

.optional {
  font-weight: 500;
  color: #718091;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}

.btn {
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: #ffffff;
  min-height: 53px;
  padding: 14px 20px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  user-select: none;
}

.btn:hover {
  background: var(--teal-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 127, 122, 0.2);
}

.btn:active {
  transform: translateY(0);
}

.btn.next, .btn.submit {
  width: 100%;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn.loading .btn-spinner {
  display: inline-block;
}

.btn.loading .btn-text,
.btn.loading .btn-arrow {
  opacity: 0.6;
}

.btn.back {
  background: #f0f4f7;
  color: #536579;
  min-width: 86px;
}

.btn.back:hover {
  background: #e2e9ef;
  box-shadow: none;
  transform: translateY(-1px);
}

.error {
  display: none;
  color: #b3261e;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 10px;
}

.error.show {
  display: block;
}

.secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #6d7a88;
  font-size: 0.75rem;
  margin-top: 12px;
}

.secure svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.consent-box {
  margin-top: 14px;
  padding: 13px 15px;
  background: #f8fafc;
  border: 1.5px solid #e1e9f0;
  border-radius: 10px;
  font-size: 0.72rem;
  color: #556677;
  line-height: 1.55;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.consent-box.has-error {
  border: 2px solid #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
}

.consent-box.has-error .consent-check-label strong {
  color: #dc2626 !important;
}

.consent-box.has-error .consent-checkbox-wrap input[type="checkbox"] {
  outline: 2.5px solid #dc2626 !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.24) !important;
  border-radius: 3px;
}

.consent-inline-error {
  display: none;
  color: #dc2626;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 7px 0;
  padding: 5px 9px;
  background: rgba(220, 38, 38, 0.1);
  border-left: 3px solid #dc2626;
  border-radius: 5px;
}

.consent-box.has-error .consent-inline-error {
  display: block;
}

.consent-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.consent-checkbox-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
  transition: outline 0.15s ease, box-shadow 0.15s ease;
}

.consent-check-label {
  font-size: 0.73rem;
  color: #334155;
  line-height: 1.55;
  flex: 1;
}

.consent-terms {
  font-size: 0.71rem;
  color: #64748b;
  line-height: 1.55;
  margin: 10px 0 8px;
}

.consent-nmls-badge {
  font-size: 0.71rem;
  color: var(--navy);
  font-weight: 600;
  padding-top: 9px;
  border-top: 1px dashed #cbd5e1;
  margin: 0;
}

.consent-nmls-badge a {
  color: var(--teal);
  text-decoration: underline;
}

.consent-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--teal);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
  display: inline;
}

.consent-link:hover {
  color: var(--teal-hover);
}

.modal-body ul {
  margin: 6px 0 14px 18px;
  padding: 0;
  color: #435569;
}

.modal-body li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.modal-body code {
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--navy);
}

.success {
  display: none;
  text-align: center;
  padding: 35px 8px;
}

.success.show {
  display: block;
  animation: fade 0.3s ease forwards;
}

.success-icon {
  width: 62px;
  height: 62px;
  background: #dff4eb;
  color: var(--green);
  font-size: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
}

.success h3 {
  font-size: 1.65rem;
}

.success p {
  color: var(--muted);
  margin-top: 8px;
}

/* ==========================================================================
   Trust Strip
   ========================================================================== */

.trust-strip {
  border-top: 1px solid #e0e9ef;
  border-bottom: 1px solid #e0e9ef;
  background: #ffffff;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.trust-item {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-right: 1px solid #e0e9ef;
  color: #44596f;
  font-weight: 700;
  font-size: 0.91rem;
}

.trust-item:last-child {
  border-right: 0;
}

.trust-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--sky);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
}

/* ==========================================================================
   Content Sections
   ========================================================================== */

section.content {
  padding: 76px 0;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.section-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  line-height: 1.1;
}

.section-head p {
  color: var(--muted);
  font-size: 1.04rem;
  margin: 13px 0 0;
}

/* Benefit Cards */
.benefit-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.benefit {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(7, 35, 69, 0.06);
}

.benefit .num {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--teal);
  letter-spacing: 0.08em;
}

.benefit h3 {
  font-size: 1.18rem;
  margin: 10px 0 7px;
}

.benefit p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* How It Works */
.how {
  background: #f4f8fa;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}

.how-step {
  text-align: center;
}

.how-step .circle {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
}

.how-step h3 {
  font-size: 1.12rem;
}

.how-step p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 7px auto 0;
  max-width: 280px;
}

/* Visual Trust Section */
.visual-trust {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 52px;
  align-items: center;
}

.visual-trust img {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center center;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: block;
}

.visual-copy h2 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.1;
  margin-top: 15px;
}

.visual-copy p {
  color: var(--muted);
  margin: 15px 0 20px;
}

.visual-list {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
}

.visual-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

/* FAQ Accordion */
.faq {
  max-width: 820px;
  margin: 0 auto;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 2px;
  transition: background 0.15s ease;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  font-size: 1.05rem;
  user-select: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--teal);
  line-height: 1;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "–";
}

.faq p {
  color: var(--muted);
  margin: 11px 0 2px;
  line-height: 1.6;
}

/* Privacy Notice Section */
.privacy {
  background: #f7fafb;
}

.privacy-copy {
  max-width: 850px;
  margin: 0 auto;
}

.privacy-copy h2 {
  font-size: 1.7rem;
}

.privacy-copy p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Bottom CTA Band */
.cta-band {
  background: var(--navy);
  color: #ffffff;
  padding: 48px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.cta-band h2 {
  color: #ffffff;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.cta-band p {
  color: #c5d5e5;
  margin: 7px 0 0;
}

.cta-band .btn {
  white-space: nowrap;
  padding-inline: 25px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: #081a33;
  color: #a5b7cc;
  padding: 48px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* --- Tier 1: Top Hero Co-Branding & Direct Contact --- */
.footer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.footer-brand .brand-sub {
  font-size: 0.64rem;
  color: #94a3b8;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}

.footer-divider {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.18);
}

.footer-cobrand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  text-align: center;
}

.footer-cobrand .cobrand-by {
  font-size: 0.58rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}

.footer-cobrand .cobrand-logo {
  height: 23px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.footer-cobrand .cobrand-nmls {
  font-size: 0.58rem;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 3px;
  letter-spacing: 0.03em;
}

.footer-direct-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 166, 166, 0.15);
  border: 1px solid rgba(0, 166, 166, 0.4);
  border-radius: 999px;
  color: #2dd4bf;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-contact-pill:hover {
  background: rgba(0, 166, 166, 0.28);
  border-color: #2dd4bf;
  color: #ffffff;
}

.footer-contact-pill .phone-icon {
  width: 15px;
  height: 15px;
}

.footer-email-link {
  color: #cbd5e1;
  font-size: 0.82rem;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.footer-email-link:hover {
  color: #ffffff;
}

/* --- Tier 2: 3-Column Grid Layout --- */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 32px;
}

.footer-col-title {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}

.footer-address {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0 0 14px;
}

.footer-address strong {
  color: #ffffff;
}

.footer-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.65;
  color: #94a3b8;
}

.footer-meta-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-meta-list li span {
  color: #94a3b8;
  font-size: 0.78rem;
}

.footer-meta-list strong {
  color: #ffffff;
  font-size: 0.80rem;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.80rem;
  line-height: 1.6;
}

.footer-nav-list li {
  margin-bottom: 9px;
}

.footer-nav-list a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-block;
}

.footer-nav-list a:hover {
  color: #2dd4bf;
  text-decoration: underline;
}

.footer-nav-list .btn-link {
  color: #cbd5e1;
  font-size: 0.80rem;
  text-align: left;
}

.footer-nav-list .btn-link:hover {
  color: #2dd4bf;
}

/* Col 3: Equal Housing Card & VA Callout */
.ehl-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 18px 20px;
}

.ehl-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.ehl-logo {
  height: 48px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.ehl-copy {
  flex: 1;
}

.ehl-title {
  display: block;
  color: #ffffff;
  font-size: 0.90rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.ehl-desc {
  font-size: 0.74rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

.va-callout-box {
  background: rgba(0, 166, 166, 0.08);
  border: 1px solid rgba(0, 166, 166, 0.35);
  border-radius: 8px;
  padding: 12px 14px;
}

.va-callout-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2dd4bf;
  margin-bottom: 5px;
}

.va-nmls-req {
  color: #ffffff;
  font-size: 0.77rem;
  line-height: 1.55;
  margin: 0;
  font-weight: 500;
}

.va-nmls-req a {
  color: #2dd4bf;
  text-decoration: underline;
  word-break: break-all;
}

.va-nmls-req a:hover {
  color: #ffffff;
}

/* --- Tier 3: Disclaimer Fine Print --- */
.footer-disclaimer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-disclaimer p {
  font-size: 0.71rem;
  line-height: 1.6;
  color: #8294a8;
  margin: 0;
}

/* --- Tier 4: Bottom Copyright & Badges --- */
.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.76rem;
  color: #8294a8;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.footer-badges {
  color: #9bb0c7;
  font-weight: 500;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  display: inline;
}

.btn-link:hover {
  color: #ffffff;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 24px;
  padding-top: 18px;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.copyright a {
  color: inherit;
}

.copyright a:hover {
  color: #ffffff;
}

/* ==========================================================================
   Compliance Modals (Dialog)
   ========================================================================== */

dialog.modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 580px;
  width: calc(100% - 32px);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin: auto;
}

dialog.modal::backdrop {
  background: rgba(6, 26, 52, 0.6);
  backdrop-filter: blur(2px);
}

.modal-box {
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-body {
  padding: 20px 24px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.6;
}

.modal-body h4 {
  margin: 16px 0 6px;
  color: var(--navy);
  font-size: 1rem;
}

.modal-body p {
  margin: 0 0 12px;
  color: #435569;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.modal-footer .btn {
  min-height: 42px;
  padding: 8px 18px;
}

/* ==========================================================================
   Sticky Mobile CTA
   ========================================================================== */

.mobile-cta {
  display: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-cta.hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-points {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .proof-note {
    justify-content: center;
  }

  .form-card {
    max-width: 570px;
    margin: 0 auto;
  }

  .benefit-cards,
  .steps,
  .visual-trust {
    grid-template-columns: 1fr;
  }

  .visual-trust {
    justify-items: center;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .trust-item {
    border-right: 0;
    border-bottom: 1px solid #e0e9ef;
    justify-content: flex-start;
  }

  .trust-item:last-child {
    border-bottom: 0;
  }

  .cta-inner {
    text-align: center;
    display: block;
  }

  .cta-band .btn {
    margin-top: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  header {
    height: 64px;
  }

  .nav {
    gap: 12px;
  }

  .header-help small {
    display: none;
  }

  .header-cta {
    display: none; /* Hide top CTA in navbar on mobile/tablet — user has persistent sticky bottom CTA */
  }

  .brand {
    font-size: 1.05rem;
    gap: 9px;
    flex-shrink: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
  }

  .brand-mark svg {
    width: 22px;
    height: 22px;
  }

  .header-actions {
    gap: 0;
    flex-shrink: 0;
  }

  .header-phone {
    font-size: 0.86rem;
    padding: 6px 12px;
    background: #eef8f8;
    border: 1px solid rgba(0, 127, 122, 0.22);
    border-radius: 999px;
    color: var(--teal);
    white-space: nowrap;
    text-decoration: none;
  }

  .header-phone:hover {
    background: #e1f2f2;
    text-decoration: none;
  }

  .cobrand-badge {
    padding-left: 10px;
    gap: 6px;
  }

  .cobrand-by {
    font-size: 0.62rem;
  }

  .cobrand-logo {
    height: 19px;
    max-width: 100px;
  }
}

@media (max-width: 600px) {
  body {
    padding-bottom: 72px;
  }

  header {
    height: auto;
    min-height: 54px;
    padding: 6px 0;
  }

  .wrap {
    width: min(100% - 20px, 1160px);
  }

  .notice {
    font-size: 0.72rem;
    padding: 6px 10px;
    line-height: 1.35;
  }

  .nav {
    gap: 6px;
  }

  .brand-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    max-width: calc(100% - 120px);
  }

  .brand {
    font-size: 0.92rem;
    gap: 7px;
    flex-shrink: 0;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  .brand-mark svg {
    width: 18px;
    height: 18px;
  }

  .brand-nmls {
    font-size: 0.56rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
  }

  .cobrand-badge {
    border-left: none;
    padding-left: 0;
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .cobrand-by {
    font-size: 0.52rem;
    margin-bottom: 0;
  }

  .cobrand-logo {
    height: 13px;
    max-width: 72px;
  }

  .cobrand-nmls {
    font-size: 0.50rem;
    margin-top: 0;
  }

  .header-help small {
    display: none;
  }

  .header-actions {
    gap: 0;
    flex-shrink: 0;
  }

  .header-cta {
    display: none;
  }

  .header-phone {
    font-size: 0.78rem;
    padding: 5px 9px;
    gap: 4px;
    background: #eef8f8;
    border: 1px solid rgba(0, 127, 122, 0.22);
    border-radius: 999px;
    color: var(--teal);
    box-shadow: 0 1px 3px rgba(9, 40, 79, 0.05);
    white-space: nowrap;
  }

  .header-phone:hover {
    background: #e1f2f2;
    text-decoration: none;
  }

  .header-phone .phone-icon {
    width: 12px;
    height: 12px;
  }

  .hero {
    padding: 16px 0 24px;
  }

  .hero-grid {
    gap: 16px;
  }

  .ad-match {
    padding: 5px 10px;
    font-size: 0.72rem;
    margin-bottom: 6px;
  }

  h1 {
    font-size: 1.85rem;
    line-height: 1.15;
    margin-top: 8px;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
  }

  .hero-lead {
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 6px 0 10px;
  }

  .hero-points {
    grid-template-columns: 1fr;
    margin-bottom: 0;
    gap: 6px;
  }

  .hero-points li {
    font-size: 0.82rem;
    gap: 7px;
  }

  .hero-points li:nth-child(n+3) {
    display: none;
  }

  .proof-note {
    display: none;
  }

  .form-card {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .form-top {
    padding: 0 0 10px;
  }

  .form-top h2 {
    font-size: 1.22rem;
    line-height: 1.25;
  }

  .form-top p {
    font-size: 0.80rem;
    margin-top: 3px;
  }

  .progress-wrap {
    margin: 0 0 14px;
  }

  .progress-meta {
    font-size: 0.76rem;
    margin-bottom: 5px;
  }

  .progress {
    height: 5px;
  }

  .question {
    font-size: 1.00rem;
    margin: 0 0 10px;
    line-height: 1.3;
  }

  .choices {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .choice label {
    font-size: 0.84rem;
    padding: 8px 6px;
    min-height: 46px;
    line-height: 1.2;
    border-radius: 8px;
  }

  .field label {
    font-size: 0.80rem;
    margin-bottom: 4px;
  }

  .field input,
  .field select {
    min-height: 46px;
    font-size: 0.92rem;
    padding: 9px 12px;
    border-radius: 8px;
  }

  .actions {
    margin-top: 12px;
  }

  .actions .btn {
    min-height: 48px;
    font-size: 0.96rem;
    border-radius: 9px;
  }

  .secure {
    margin-top: 8px;
    font-size: 0.72rem;
    gap: 5px;
  }

  .consent-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 0.67rem;
    line-height: 1.45;
  }

  .consent-terms {
    margin-top: 6px;
    font-size: 0.63rem;
    line-height: 1.42;
  }

  .consent-nmls-badge {
    margin-top: 6px;
    font-size: 0.62rem;
  }

  .full {
    grid-column: auto;
  }

  .section {
    padding: 40px 0;
  }

  .section-head {
    text-align: left;
    margin-bottom: 22px;
  }

  .section-head h2 {
    font-size: 1.48rem;
    line-height: 1.2;
  }

  .section-sub {
    font-size: 0.88rem;
    margin-top: 6px;
  }

  .benefit-card {
    padding: 18px 16px;
    border-radius: 13px;
  }

  .benefit-card h3 {
    font-size: 1.05rem;
    margin: 8px 0 6px;
  }

  .benefit-card p {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .step-item {
    padding: 18px 14px;
    border-radius: 13px;
  }

  .trust-item {
    padding: 12px 4px;
  }

  .faq-item {
    padding: 14px 16px;
    border-radius: 11px;
  }

  .faq-question {
    font-size: 0.94rem;
  }

  .faq-answer {
    font-size: 0.84rem;
    line-height: 1.5;
  }

  footer {
    padding: 30px 0 76px;
  }

  .footer-grid {
    gap: 22px;
  }

  .footer-col h4 {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .footer-links li {
    margin-bottom: 5px;
    font-size: 0.80rem;
  }

  .footer-disclaimer-box {
    padding: 12px 14px;
    margin: 18px 0;
    font-size: 0.67rem;
    line-height: 1.5;
  }

  .footer-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-brand-lockup {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-divider {
    display: none;
  }

  .footer-direct-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .footer-contact-pill {
    width: 100%;
    justify-content: center;
    font-size: 0.84rem;
    padding: 8px 14px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.70rem;
  }

  .mobile-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    box-shadow: 0 -4px 18px rgba(8, 35, 68, 0.08);
  }

  .mobile-cta .btn {
    width: 100%;
    min-height: 46px;
    font-size: 0.98rem;
    border-radius: 9px;
  }
}

@media (max-width: 380px) {
  .wrap {
    width: min(100% - 16px, 1160px);
  }

  .brand-group {
    max-width: calc(100% - 100px);
  }

  .brand {
    font-size: 0.85rem;
    gap: 5px;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }

  .brand-mark svg {
    width: 15px;
    height: 15px;
  }

  .brand-nmls {
    font-size: 0.52rem;
    max-width: 140px;
  }

  .header-phone {
    font-size: 0.72rem;
    padding: 4px 7px;
    gap: 3px;
  }

  .header-phone .phone-icon {
    width: 11px;
    height: 11px;
  }

  .cobrand-logo {
    height: 12px;
    max-width: 65px;
  }

  .cobrand-by {
    font-size: 0.50rem;
  }

  h1 {
    font-size: 1.68rem;
  }

  .form-card {
    padding: 14px 11px;
  }

  .choices {
    gap: 6px;
  }

  .choice label {
    font-size: 0.80rem;
    padding: 7px 4px;
    min-height: 44px;
  }
}

@media (max-width: 340px) {
  .wrap {
    width: min(100% - 12px, 1160px);
  }

  .brand-group {
    max-width: calc(100% - 85px);
  }

  .brand {
    font-size: 0.80rem;
    gap: 4px;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 5px;
  }

  .brand-mark svg {
    width: 14px;
    height: 14px;
  }

  .brand-nmls {
    font-size: 0.48rem;
    max-width: 120px;
  }

  .header-phone {
    font-size: 0.68rem;
    padding: 3px 5px;
    gap: 2px;
  }

  h1 {
    font-size: 1.52rem;
  }
}
