/* ==========================================================================
   Northgate Mortgage Partners: components
   ========================================================================== */

/* ---------- Layout -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--narrow { max-width: var(--content-narrow); }
.container--default { max-width: var(--content-default); }

.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section--alt  { background: var(--color-surface-2); }
.section--tint { background: var(--color-primary-tint); }
[data-theme="dark"] .section--tint { background: var(--color-surface-2); }
.section--navy {
  background: linear-gradient(160deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: #fff;
}
[data-theme="dark"] .section--navy {
  background: linear-gradient(160deg, #12253a 0%, #0b1520 100%);
}

.section-header { text-align: center; max-width: 720px; margin: 0 auto var(--space-12); }
.section-eyebrow {
  display: inline-block; font-size: var(--text-xs); font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-accent-text); margin-bottom: var(--space-3);
}
.section--navy .section-eyebrow { color: var(--brand-accent-light); }
.section-title { font-size: var(--text-2xl); font-weight: 800; color: var(--color-text); letter-spacing: -0.02em; }
.section--navy .section-title { color: #fff; }
.section-desc { margin-top: var(--space-4); font-size: var(--text-lg); color: var(--color-text-muted); line-height: 1.6; }
.section--navy .section-desc { color: rgba(255,255,255,0.78); }

.text-left { text-align: left; }
.lead { font-size: var(--text-lg); color: var(--color-text-muted); line-height: 1.7; }
.prose p { color: var(--color-text-muted); line-height: 1.75; margin-bottom: var(--space-5); }
.prose h3 { font-size: var(--text-lg); font-weight: 700; margin: var(--space-8) 0 var(--space-4); }
.prose ul { margin: 0 0 var(--space-5) var(--space-5); color: var(--color-text-muted); }
.prose li { margin-bottom: var(--space-2); }

/* ---------- Demo ribbon --------------------------------------------- */
.demo-bar {
  background: var(--color-accent);
  color: #21160a;
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
  padding: var(--space-2) var(--space-4);
  letter-spacing: 0.01em;
}
.demo-bar a { color: #21160a; text-decoration: underline; }

/* ---------- Header / nav -------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--brand-primary);
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
[data-theme="dark"] .site-header { background: #0d1c2b; }

.nav-inner {
  display: flex; align-items: center; gap: var(--space-6);
  min-height: var(--header-h);
}

.site-logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; flex-shrink: 0; }
.logo-mark { width: 38px; height: 38px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  color: #fff; letter-spacing: -0.02em; white-space: nowrap;
}
.logo-sub {
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brand-accent-light); white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; list-style: none; }
.nav-links > li { position: relative; }
.nav-links a {
  display: flex; align-items: center; gap: 4px;
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem; font-weight: 600; text-decoration: none;
  color: rgba(255,255,255,0.82); border-radius: var(--radius-md); white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.12); }
.nav-links a.active { color: #fff; box-shadow: inset 0 -2px 0 var(--brand-accent-light); }

.dropdown-arrow { width: 13px; height: 13px; transition: transform var(--transition-interactive); }
.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown:focus-within .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 232px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: var(--space-2); display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--transition-interactive), transform var(--transition-interactive), visibility var(--transition-interactive);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
  color: var(--color-text); font-size: 0.875rem; font-weight: 600;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
}
.dropdown-menu a:hover { background: var(--color-primary-soft); color: var(--color-primary); }

.nav-right { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }

.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: var(--radius-md); color: rgba(255,255,255,0.82);
}
.theme-toggle:hover { background: rgba(255,255,255,0.14); color: #fff; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.btn--nav {
  background: var(--color-accent); color: #21160a;
  padding: 0.55rem 1.1rem; border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 800; text-decoration: none; white-space: nowrap;
}
.btn--nav:hover { background: var(--color-accent-hover); color: #fff; }

.mobile-toggle { display: none; width: 40px; height: 40px; place-items: center; border-radius: var(--radius-md); color: rgba(255,255,255,0.9); }
.mobile-toggle:hover { background: rgba(255,255,255,0.12); }

/* The desktop nav measures ~1164px with the logo and CTA. Anything narrower
   than 1180 gets the mobile menu, or the nav pushes the page sideways. */
@media (max-width: 1180px) {
  .nav-links { display: none; }
  .mobile-toggle { display: grid; }
  .btn--nav { display: none; }
}

/* Very narrow phones: shrink the lockup so the header never overflows at 320px. */
@media (max-width: 400px) {
  .nav-inner { gap: var(--space-3); }
  .logo-mark { width: 32px; height: 32px; }
  .logo-name { font-size: 0.9375rem; }
  .logo-sub { font-size: 0.5rem; letter-spacing: 0.12em; }
  .theme-toggle { width: 34px; height: 34px; }
  .mobile-toggle { width: 34px; height: 34px; }
  .demo-bar { font-size: 0.6875rem; }
}

.mobile-nav {
  display: none; flex-direction: column;
  background: var(--brand-primary-dark);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: var(--space-3) var(--space-6) var(--space-6);
  position: sticky; top: var(--header-h); z-index: 99;
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
}
[data-theme="dark"] .mobile-nav { background: #0a1725; }
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 600;
  padding: var(--space-3) var(--space-2); border-radius: var(--radius-md);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.09); color: #fff; }
.mobile-nav .mobile-group {
  font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-accent-light);
  padding: var(--space-5) var(--space-2) var(--space-2); border: 0;
}
.mobile-nav .mobile-cta {
  margin-top: var(--space-5); background: var(--color-accent); color: #21160a;
  text-align: center; font-weight: 800; border: 0; padding: var(--space-4);
}

/* ---------- Buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 700; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; text-align: center;
}
.btn--lg { padding: 0.95rem 2rem; font-size: var(--text-base); }
.btn--block { width: 100%; }
.btn--primary { background: var(--color-accent); color: #21160a; }
.btn--primary:hover { background: var(--color-accent-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--secondary { background: var(--color-primary); color: #fff; }
.btn--secondary:hover { background: var(--color-primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
[data-theme="dark"] .btn--secondary { color: #0b1520; }
.btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn--outline:hover { background: rgba(255,255,255,0.14); border-color: #fff; }
.btn--ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn--ghost:hover { background: var(--color-primary-soft); border-color: var(--color-primary); }

/* ---------- Hero ----------------------------------------------------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; overflow: hidden; }
.hero--short { min-height: 46vh; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(9,22,40,0.93) 0%, rgba(9,22,40,0.84) 38%, rgba(9,22,40,0.42) 72%, rgba(9,22,40,0.28) 100%);
}
.hero-content { position: relative; z-index: 1; width: 100%; padding-block: clamp(4rem, 9vw, 7rem); }
.hero-inner { max-width: 640px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brand-accent-light); margin-bottom: var(--space-4);
}
.hero-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--brand-accent-light); }
.hero-title {
  font-size: var(--text-3xl); font-weight: 800; color: #fff;
  letter-spacing: -0.03em; margin-bottom: var(--space-5);
}
.hero-title span { color: var(--brand-accent-light); }
.hero-subtitle { font-size: var(--text-lg); color: rgba(255,255,255,0.85); line-height: 1.6; margin-bottom: var(--space-8); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.hero-trust { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-top: var(--space-10); }
.trust-item { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: rgba(255,255,255,0.82); }
.trust-item svg { width: 18px; height: 18px; color: var(--brand-accent-light); flex-shrink: 0; }

.page-hero { min-height: 52vh; }
.page-hero .hero-title { font-size: var(--text-2xl); }

/* ---------- Cards ---------------------------------------------------- */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-8); box-shadow: var(--shadow-sm);
}
.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 276px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.loan-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-3);
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
}
.loan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-primary); }
.loan-icon {
  width: 52px; height: 52px; border-radius: var(--radius-lg);
  display: grid; place-items: center; background: var(--color-primary-soft);
  color: var(--color-primary); margin-bottom: var(--space-2);
}
.loan-icon svg { width: 26px; height: 26px; }
.loan-name { font-size: 1.125rem; font-weight: 800; color: var(--color-text); }
.loan-desc { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; flex-grow: 1; }
.loan-link { font-size: var(--text-sm); font-weight: 800; color: var(--color-primary); display: inline-flex; align-items: center; gap: 6px; }
.loan-card:hover .loan-link { gap: 12px; }

/* ---------- Process steps ------------------------------------------- */
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr)); gap: var(--space-8); }
.process-step { text-align: center; }
.step-number {
  width: 56px; height: 56px; margin: 0 auto var(--space-5);
  border-radius: var(--radius-full); display: grid; place-items: center;
  background: var(--color-accent); color: #21160a;
  font-size: 1.375rem; font-weight: 800;
}
.section--navy .step-number { background: var(--brand-accent-light); }
.step-title { font-size: 1.0625rem; font-weight: 800; margin-bottom: var(--space-2); }
.step-desc { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; }
.section--navy .step-desc { color: rgba(255,255,255,0.75); }

/* ---------- Stats ---------------------------------------------------- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: var(--space-8); text-align: center; }
.stat-number { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; color: var(--brand-accent-light); letter-spacing: -0.03em; }
.stat-label { font-size: var(--text-sm); color: rgba(255,255,255,0.75); margin-top: var(--space-1); }

/* ---------- Content list -------------------------------------------- */
.content-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.content-list li {
  position: relative; padding-left: var(--space-8);
  font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65;
}
.content-list li::before {
  content: ""; position: absolute; left: 0; top: 0.35em;
  width: 18px; height: 18px; border-radius: var(--radius-full);
  background: var(--color-primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314304f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
}
[data-theme="dark"] .content-list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b9bd5' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

.two-col { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Team ----------------------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-8); }
.officer-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.officer-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.officer-photo { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: var(--color-surface-2); }
.officer-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); flex-grow: 1; }
.officer-name { font-size: 1.1875rem; font-weight: 800; }
.officer-role { font-size: var(--text-sm); font-weight: 700; color: var(--color-accent-text); }
.officer-nmls {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em;
  color: var(--color-text-faint); text-transform: uppercase;
}
.officer-blurb { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; flex-grow: 1; }
.officer-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }
.officer-actions a { font-size: var(--text-sm); font-weight: 700; text-decoration: none; color: var(--color-primary); }
.officer-actions a:hover { text-decoration: underline; }

.profile-head { display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 780px) { .profile-head { grid-template-columns: 1fr; } }
.profile-photo { width: 100%; border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg); aspect-ratio: 1/1; object-fit: cover; }
.profile-meta { display: flex; flex-direction: column; gap: var(--space-3); }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem; border-radius: var(--radius-full);
  background: var(--color-primary-soft); color: var(--color-primary);
}
.badge--accent { background: var(--color-accent-soft); color: var(--color-accent-text); }
[data-theme="dark"] .badge--accent { color: var(--color-accent); }

.contact-lines { display: flex; flex-direction: column; gap: var(--space-4); }
.contact-line { display: flex; align-items: center; gap: var(--space-4); }
.contact-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: var(--radius-lg);
  display: grid; place-items: center; background: var(--color-primary-soft); color: var(--color-primary);
}
.contact-icon svg { width: 19px; height: 19px; }
.contact-label { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-faint); }
.contact-value { font-weight: 700; color: var(--color-text); text-decoration: none; word-break: break-word; }
a.contact-value:hover { color: var(--color-primary); }

/* ---------- Testimonials -------------------------------------------- */
.testimonial-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-8); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.stars { display: flex; gap: 3px; color: var(--color-accent); }
.stars svg { width: 17px; height: 17px; }
.testimonial-text { color: var(--color-text-muted); line-height: 1.75; font-size: var(--text-sm); flex-grow: 1; }
.testimonial-author { display: flex; align-items: center; gap: var(--space-3); }
.author-initials {
  width: 42px; height: 42px; border-radius: var(--radius-full); flex-shrink: 0;
  display: grid; place-items: center; background: var(--color-primary); color: #fff;
  font-weight: 800; font-size: var(--text-sm);
}
[data-theme="dark"] .author-initials { color: #0b1520; }
.author-name { font-weight: 800; font-size: var(--text-sm); }
.author-meta { font-size: var(--text-xs); color: var(--color-text-faint); }

/* ---------- CTA band ------------------------------------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
  color: #fff; padding-block: clamp(3.5rem, 7vw, 5.5rem); text-align: center;
}
[data-theme="dark"] .cta-band { background: linear-gradient(135deg, #12253a 0%, #1b3b5c 100%); }
.cta-band h2 { font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--space-4); letter-spacing: -0.02em; }
.cta-band p { color: rgba(255,255,255,0.82); font-size: var(--text-lg); margin-bottom: var(--space-8); }
.cta-btns { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: center; }

/* ---------- Rates table ---------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rates-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.rates-table th, .rates-table td {
  padding: var(--space-4) var(--space-5); text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.14); font-size: var(--text-sm);
}
.rates-table th { font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-accent-light); font-weight: 800; }
.rates-table td { color: rgba(255,255,255,0.85); }
.rates-table td:first-child { font-weight: 700; color: #fff; }
.rate-figure { font-family: var(--font-display); font-weight: 800; font-size: 1.0625rem; color: var(--brand-accent-light); }

/* ---------- Forms ---------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); }
.form-label .req { color: var(--color-error); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.75rem var(--space-4);
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.form-textarea { min-height: 132px; resize: vertical; }
.form-hint { font-size: var(--text-xs); color: var(--color-text-faint); }
.form-consent { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.6; }
.form-consent input { margin-top: 2px; width: 24px; height: 24px; flex-shrink: 0; accent-color: var(--color-primary); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.radio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--space-3); }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-card span {
  display: block; padding: var(--space-4); text-align: center; cursor: pointer;
  border: 2px solid var(--color-border); border-radius: var(--radius-lg);
  font-size: var(--text-sm); font-weight: 700; background: var(--color-surface);
}
.radio-card input:checked + span { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary); }
.radio-card input:focus-visible + span { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.radio-card small { display: block; font-weight: 600; font-size: var(--text-xs); color: var(--color-text-faint); margin-top: 2px; }

.form-status {
  margin-top: var(--space-5); padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg); font-size: var(--text-sm); font-weight: 600;
  background: var(--color-primary-soft); color: var(--color-primary);
}

/* ---------- Multi-step qualifier ------------------------------------- */
.qualifier { max-width: 640px; margin-inline: auto; }
.q-progress { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-6); }
.q-dot { flex: 1; height: 5px; border-radius: var(--radius-full); background: var(--color-border); }
.q-dot.done { background: var(--color-accent); }
/* Without JS every step stays visible, so the form degrades to one long form
   that still submits. Only the .js build collapses it into four steps. */
.q-step { display: flex; flex-direction: column; gap: var(--space-5); }
.js .q-step { display: none; }
.js .q-step.active { display: flex; }
.q-step + .q-step { margin-top: var(--space-10); padding-top: var(--space-8); border-top: 1px solid var(--color-divider); }
.js .q-step + .q-step { margin-top: 0; padding-top: 0; border-top: 0; }
.no-js-submit { margin-top: var(--space-8); }
.js .no-js-submit { display: none; }
.js .q-progress { display: flex; }
.q-progress { display: none; }
.q-count { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent-text); }
.q-question { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.02em; }
.q-help { font-size: var(--text-sm); color: var(--color-text-muted); }
.q-actions { display: none; gap: var(--space-3); justify-content: space-between; margin-top: var(--space-2); }
.js .q-actions { display: flex; }

/* ---------- Calculator ----------------------------------------------- */
.calc-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); align-items: start; }
@media (max-width: 860px) { .calc-layout { grid-template-columns: 1fr; } }
.calc-result {
  background: linear-gradient(150deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: #fff; border-radius: var(--radius-xl); padding: var(--space-8); position: sticky; top: calc(var(--header-h) + 1rem);
}
[data-theme="dark"] .calc-result { background: linear-gradient(150deg, #12253a 0%, #0b1520 100%); }
.calc-total { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; color: var(--brand-accent-light); letter-spacing: -0.03em; }
.calc-total-label { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.calc-breakdown { list-style: none; margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.calc-breakdown li { display: flex; justify-content: space-between; gap: var(--space-4); font-size: var(--text-sm); color: rgba(255,255,255,0.82); padding-bottom: var(--space-3); border-bottom: 1px solid rgba(255,255,255,0.14); }
.calc-breakdown li:last-child { border-bottom: 0; }
.calc-breakdown b { color: #fff; font-weight: 700; }
.range-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
input[type="range"] { width: 100%; accent-color: var(--brand-accent); }

/* ---------- Blog ------------------------------------------------------ */
.post-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-meta { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-text); }
.post-title { font-size: 1.125rem; font-weight: 800; line-height: 1.3; }
.post-excerpt { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; flex-grow: 1; }

.article { max-width: var(--content-narrow); margin-inline: auto; }
.article h2 { font-size: var(--text-xl); font-weight: 800; margin: var(--space-10) 0 var(--space-4); }
.article h3 { font-size: var(--text-lg); font-weight: 800; margin: var(--space-8) 0 var(--space-3); }
.article p { color: var(--color-text-muted); line-height: 1.8; margin-bottom: var(--space-5); }
.article ul, .article ol { margin: 0 0 var(--space-6) var(--space-6); color: var(--color-text-muted); line-height: 1.8; }
.article li { margin-bottom: var(--space-2); }

/* ---------- FAQ / accordion (open in DOM, CSS-collapsed) ------------- */
.faq-item { border-bottom: 1px solid var(--color-divider); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: var(--space-5) 0;
  font-weight: 700; font-size: var(--text-base); display: flex;
  justify-content: space-between; align-items: center; gap: var(--space-4);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--color-accent-text); line-height: 1; flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-body { padding-bottom: var(--space-5); color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.75; }

/* ---------- Footer ---------------------------------------------------- */
.site-footer { background: var(--brand-primary-dark); color: rgba(255,255,255,0.72); padding-block: var(--space-16) var(--space-8); }
[data-theme="dark"] .site-footer { background: #08131f; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--space-10); }
@media (max-width: 940px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: var(--text-sm); line-height: 1.7; margin-top: var(--space-4); max-width: 34ch; }
.footer-col h3 { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-accent-light); margin-bottom: var(--space-4); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-links a { color: rgba(255,255,255,0.72); text-decoration: none; font-size: var(--text-sm); }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-divider { height: 1px; background: rgba(255,255,255,0.14); margin: var(--space-10) 0 var(--space-6); }
.footer-legal { font-size: var(--text-xs); line-height: 1.75; color: rgba(255,255,255,0.55); display: flex; flex-direction: column; gap: var(--space-4); }
.footer-legal a { color: rgba(255,255,255,0.75); }
.footer-badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-2); }
.footer-badge { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-weight: 700; color: rgba(255,255,255,0.65); }
.footer-badge svg { width: 26px; height: 26px; flex-shrink: 0; }

/* ---------- Scroll reveal (no-JS safe: visible by default) ----------- */
.js .fade-up { opacity: 0; transform: translateY(22px); transition: opacity var(--transition-slow), transform var(--transition-slow); }
.js .fade-up.visible { opacity: 1; transform: none; }
.js .fade-up[data-delay="1"] { transition-delay: 0.08s; }
.js .fade-up[data-delay="2"] { transition-delay: 0.16s; }
.js .fade-up[data-delay="3"] { transition-delay: 0.24s; }
.js .fade-up[data-delay="4"] { transition-delay: 0.32s; }
.js .fade-up[data-delay="5"] { transition-delay: 0.40s; }
.js .fade-up[data-delay="6"] { transition-delay: 0.48s; }
@media (prefers-reduced-motion: reduce) { .js .fade-up { opacity: 1; transform: none; } }

/* ---------- Breadcrumb ------------------------------------------------ */
.crumbs { font-size: var(--text-xs); color: rgba(255,255,255,0.7); margin-bottom: var(--space-4); }
.crumbs a { color: rgba(255,255,255,0.85); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Small-screen tuning -------------------------------------- */
@media (max-width: 400px) {
  .container { padding-inline: var(--space-4); }
}

@media (max-width: 560px) {
  .container { padding-inline: var(--space-5); }
  .hero { min-height: 68vh; }
  .hero-ctas .btn, .cta-btns .btn { width: 100%; }
  .card, .loan-card, .testimonial-card { padding: var(--space-6); }
  .section-header { margin-bottom: var(--space-8); }
}

/* Long URLs, emails, and unbroken strings must wrap, not widen the page. */
.article, .prose, .content-list li, .footer-legal, .contact-value, .faq-body {
  overflow-wrap: anywhere;
}
.article a, .prose a, .footer-legal a { overflow-wrap: anywhere; }
