/* ============================================================
   Crestline Funding — Warm Editorial site stylesheet
   Tokens, layout, components, responsive.
   Derived from CrestlineDemo2.html (Design Concept 4: Warm Editorial).
   ============================================================ */

/* Webfont — keep on Google Fonts; CSS @import is here so we can
   subset/swap easily later.  HTML files also link the stylesheet
   directly for faster first paint. */

:root {
  /* Surfaces */
  --cream:        #faf6ef;
  --cream-deep:   #f2ece2;
  --warm-white:   #fffdf9;

  /* Brand */
  --sage:         #2c4a5e;
  --sage-light:   #3d6a82;
  --sage-muted:   #e4eaef;
  --terracotta:   #c67a52;
  --terracotta-light: #e0a484;
  --gold:         #c9a961;
  --gold-light:   #dfc68a;

  /* Text */
  --charcoal:     #3a3530;
  --charcoal-mid: #5a554e;
  --charcoal-light:#8a847c;
  --text-body:    #4a453e;
  --text-muted:   #9a948c;

  /* Borders & shadows */
  --border-soft:  rgba(58,53,48,0.08);
  --border-mid:   rgba(58,53,48,0.16);
  --shadow-warm:  0 4px 30px rgba(58,53,48,0.08);
  --shadow-hover: 0 12px 40px rgba(58,53,48,0.12);

  /* Geometry */
  --radius-soft:  16px;
  --radius-pill:  100px;
  --max-w:        1320px;

  /* Type */
  --font-serif:   'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-sans:    'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Motion */
  --ease-soft:    cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text-body);
  line-height: 1.7;
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--sage); color: #fff; padding: 0.75rem 1rem; z-index: 9999; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  z-index: 1000;
  padding: 0.25rem 5%;
  transition: background-color 0.4s var(--ease-soft), backdrop-filter 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft), padding 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}
.site-header.scrolled {
  background: rgba(250, 246, 239, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.15rem 5%;
  border-bottom-color: var(--border-soft);
  box-shadow: 0 2px 18px rgba(58, 53, 48, 0.06);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.logo-area {
  display: inline-flex; align-items: center; gap: 0.6rem; line-height: 1;
  position: relative;
}
.site-logo {
  height: 96px; width: auto;
  display: block;
  transition: height 0.4s var(--ease-soft), opacity 0.35s var(--ease-soft);
}
/* Default state (over hero): show the white logo */
.site-logo--light { opacity: 1; }
.site-logo--dark {
  position: absolute; top: 0; left: 0;
  opacity: 0;
  pointer-events: none;
}
/* Scrolled state: fade in the colored logo, hide the white one */
.site-header.scrolled .site-logo--light { opacity: 0; }
.site-header.scrolled .site-logo--dark { opacity: 1; }
.site-header.scrolled .site-logo { height: 78px; }

@media (max-width: 768px) {
  .site-logo { height: 64px; }
  .site-header.scrolled .site-logo { height: 54px; }
}
/* Legacy logo classes kept for backwards-compat — unused after logo swap */
.logo-mark, .logo-text { display: none; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-item { position: relative; }
.nav-link {
  font-size: 0.88rem; font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0,0,0,0.45);
  position: relative;
  letter-spacing: 0.2px;
  transition: color 0.3s, text-shadow 0.3s;
  padding: 0.4rem 0;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.site-header.scrolled .nav-link { color: var(--charcoal); text-shadow: none; }
.nav-link:hover { color: var(--gold-light); }
.site-header.scrolled .nav-link:hover { color: var(--sage); }
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  height: 1.5px; background: var(--sage);
  width: 0; transition: width 0.3s var(--ease-soft);
}
.nav-link:hover::after, .nav-link[aria-expanded="true"]::after { width: 100%; }
.nav-link.has-dropdown::after { content: none; }
.nav-link.has-dropdown::before {
  content: '▾'; font-size: 0.7rem; margin-left: 0.25rem;
  display: inline-block; transition: transform 0.3s;
}
.nav-item.is-open .nav-link.has-dropdown::before { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute; top: calc(100% + 0.6rem); left: 0;
  background: var(--warm-white);
  min-width: 240px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-warm);
  padding: 0.6rem 0;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s var(--ease-soft);
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown,
.nav-item.is-open .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a {
  display: block;
  padding: 0.55rem 1.2rem;
  color: var(--charcoal-mid);
  font-size: 0.88rem; font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}
.nav-dropdown a:hover { background: var(--cream); color: var(--sage); }
.nav-dropdown-divider { border-top: 1px solid var(--border-soft); margin: 0.35rem 0; }

.nav-phone {
  font-size: 0.88rem; font-weight: 600;
  color: var(--gold-light);
  text-shadow: 0 1px 12px rgba(0,0,0,0.45);
  transition: color 0.3s, text-shadow 0.3s;
}
.nav-phone:hover { color: var(--terracotta-light); }
.site-header.scrolled .nav-phone { color: var(--terracotta); text-shadow: none; }

.nav-cta {
  background: var(--sage);
  color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.3px;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.nav-cta:hover { background: var(--sage-light); transform: translateY(-1px); box-shadow: var(--shadow-hover); }

.nav-toggle {
  display: none;
  background: transparent; border: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: #fff;
}
.site-header.scrolled .nav-toggle { color: var(--charcoal); }
.nav-toggle svg { width: 24px; height: 24px; }

.mobile-nav {
  position: fixed; inset: 0;
  background: var(--warm-white);
  z-index: 999;
  padding: 5rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-soft);
  overflow-y: auto;
  display: none;
}
body.nav-open .mobile-nav { transform: translateX(0); }
body.nav-open { overflow: hidden; }
.mobile-nav a {
  display: block; padding: 1rem 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--charcoal); font-size: 1.1rem; font-weight: 500;
}
.mobile-nav a.indent { padding-left: 1.5rem; font-size: 0.95rem; color: var(--charcoal-mid); }
.mobile-nav a strong { font-family: var(--font-serif); }

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  padding: 8rem 5% 5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(58,53,48,0.7) 0%, rgba(90,85,78,0.55) 40%, rgba(44,74,94,0.45) 100%),
              radial-gradient(circle at 30% 70%, rgba(198,122,82,0.25) 0%, transparent 60%),
              url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1920&q=85');
  background-size: cover;
  background-position: center 40%;
  animation: heroPan 30s var(--ease-soft) infinite alternate;
  z-index: 0;
}
@keyframes heroPan {
  from { transform: scale(1.05) translateY(0); }
  to   { transform: scale(1.1)  translateY(-1.5%); }
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 4rem;
  align-items: center;
}

.hero-text { max-width: 600px; color: #fff; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0,0,0,0.5);
  margin-bottom: 1.4rem;
}
.hero-eyebrow::before {
  content: ''; width: 2.5rem; height: 1px;
  background: var(--gold);
}
.hero-h1 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2.4rem, 4.2vw, 3.5rem);
  line-height: 1.18;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.hero-h1 em { color: var(--gold-light); font-style: italic; font-weight: 400; }
.hero-sub {
  font-size: 1.1rem; font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.92);
  margin-bottom: 2rem;
  max-width: 520px;
  text-shadow: 0 1px 14px rgba(0,0,0,0.35);
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn-warm, .btn-warm-outline, .btn-cta-primary, .btn-cta-secondary, .btn-card-submit {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: inherit;
  font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.4px;
  padding: 0.95rem 1.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.btn-warm { background: var(--terracotta); color: #fff; }
.btn-warm:hover { background: #b86a44; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(198,122,82,0.32); }
.btn-warm-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-warm-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-cta-primary { background: var(--sage); color: #fff; }
.btn-cta-primary:hover { background: var(--sage-light); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-cta-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-cta-secondary:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-card-submit {
  width: 100%; justify-content: center;
  background: var(--sage); color: #fff;
}
.btn-card-submit:hover { background: var(--sage-light); transform: translateY(-1px); box-shadow: var(--shadow-hover); }

/* Hero lead-capture card */
.hero-card {
  background: var(--warm-white);
  border-radius: 20px;
  padding: 2rem 1.8rem 1.6rem;
  position: relative;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sage), var(--gold));
}
.hero-card-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.4rem; color: var(--charcoal); }
.hero-card-sub { font-size: 0.88rem; color: var(--text-muted); margin: 0.3rem 0 1.4rem; }

.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.form-label {
  display: block;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--charcoal-mid);
  margin-bottom: 0.45rem;
}
.form-input, .form-select {
  width: 100%;
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-family: inherit; font-size: 0.92rem;
  color: var(--charcoal);
  transition: border-color 0.25s, background-color 0.25s;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--sage); background: var(--warm-white); }
.form-select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%235a554e'/></svg>"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2rem; }

.card-trust-line {
  font-size: 0.78rem; color: var(--text-muted);
  text-align: center; margin-top: 0.85rem;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.card-trust-line::before { content: '🔒'; font-size: 0.85rem; opacity: 0.7; }

/* ============================================================
   Landing-page shell — used by /lp/* pages.
   Stripped-down chrome: no nav dropdowns, hero is the funnel,
   single CTA, trust strip, no footer nav.
   ============================================================ */
.lp-body { background: var(--cream); }

.lp-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border-soft);
  padding: 0.9rem 5%;
}
.lp-header-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.lp-header .logo-area { color: var(--sage); }
.lp-header .site-logo { height: 48px; filter: none; }
.lp-header-right { display: flex; align-items: center; gap: 1.25rem; }
.lp-header-phone {
  font-size: 0.95rem; font-weight: 600; color: var(--terracotta);
  white-space: nowrap;
}
.lp-header-phone:hover { color: var(--sage); }
.lp-header-cta {
  background: var(--terracotta); color: #fff;
  padding: 0.65rem 1.4rem; border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.3px;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.lp-header-cta:hover { background: #b86a44; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(198, 122, 82, 0.3); }

/* Partner co-brand strip (shown when ?partner= is present) */
.lp-partner {
  display: none;
  align-items: center; gap: 0.8rem;
  padding: 0.55rem 0.9rem;
  background: var(--cream-deep);
  border-radius: 100px;
  font-size: 0.82rem; color: var(--charcoal-mid);
}
.lp-partner.is-active { display: inline-flex; }
.lp-partner img { height: 28px; width: auto; border-radius: 4px; }
.lp-partner strong { font-weight: 600; color: var(--charcoal); }

/* Hero — split: left messaging / right funnel form */
.lp-hero {
  position: relative;
  padding: 4rem 5% 5rem;
  background:
    linear-gradient(135deg, rgba(58,53,48,0.65), rgba(44,74,94,0.45) 60%, rgba(198,122,82,0.25)),
    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1920&q=85') center/cover no-repeat;
  color: #fff;
}
.lp-hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 460px;
  gap: 4rem; align-items: center;
}
.lp-hero-text { max-width: 580px; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  color: #fff;
  margin-bottom: 1.1rem;
}
.lp-eyebrow::before {
  content: ''; width: 2.5rem; height: 1px; background: var(--gold);
}
.lp-hero h1 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.15; margin-bottom: 1.2rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.lp-hero h1 em { color: var(--gold-light); font-style: italic; font-weight: 400; }
.lp-hero-sub {
  font-size: 1.08rem; line-height: 1.7; font-weight: 300;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1.6rem;
  text-shadow: 0 1px 14px rgba(0,0,0,0.4);
}
.lp-bullets {
  list-style: none; padding: 0; margin: 0 0 1.4rem;
  display: grid; gap: 0.6rem;
}
.lp-bullets li {
  position: relative; padding-left: 1.7rem;
  font-size: 0.96rem; color: rgba(255,255,255,0.92); line-height: 1.55;
  text-shadow: 0 1px 14px rgba(0,0,0,0.3);
}
.lp-bullets li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  color: var(--gold-light); font-weight: 700;
}
.lp-trust-row {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  font-size: 0.82rem; color: rgba(255,255,255,0.8);
  margin-top: 1.4rem;
}
.lp-trust-row span { display: inline-flex; align-items: center; gap: 0.4rem; }
.lp-trust-row span::before { content: '★'; color: var(--gold-light); }

/* Hero funnel card on LP */
.lp-card {
  background: var(--warm-white);
  border-radius: 20px;
  padding: 2rem 1.8rem 1.6rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.lp-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sage), var(--terracotta), var(--gold));
}
.lp-card-title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.4rem; color: var(--charcoal);
}
.lp-card-sub {
  font-size: 0.88rem; color: var(--text-muted);
  margin: 0.3rem 0 1.4rem;
}

/* Trust strip below hero */
.lp-trust-strip {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border-soft);
  padding: 1.6rem 5%;
}
.lp-trust-strip-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  text-align: center;
}
.lp-trust-item {
  font-size: 0.86rem; color: var(--charcoal-mid);
  line-height: 1.4;
}
.lp-trust-item strong {
  display: block;
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.15rem; color: var(--charcoal); margin-bottom: 0.3rem;
}

/* Testimonial — single, centered */
.lp-testimonial {
  padding: 4rem 5%;
  background: var(--cream-deep);
  text-align: center;
}
.lp-testimonial-inner {
  max-width: 720px; margin: 0 auto;
}
.lp-testimonial blockquote {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.25rem; line-height: 1.6;
  color: var(--charcoal);
  margin: 0 0 1rem;
}
.lp-testimonial blockquote::before {
  content: '"'; font-size: 3rem; color: var(--sage-light);
  display: block; line-height: 0.5; margin-bottom: 1rem; opacity: 0.6;
}
.lp-testimonial-meta {
  font-size: 0.85rem; color: var(--charcoal-light);
  letter-spacing: 0.5px;
}

/* LP footer — minimal compliance strip */
.lp-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.6);
  padding: 2rem 5%;
  font-size: 0.78rem; line-height: 1.6;
}
.lp-footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.lp-footer a { color: rgba(255,255,255,0.85); text-decoration: underline; }
.lp-footer a:hover { color: var(--gold-light); }
.lp-footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* LP responsive */
@media (max-width: 1024px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .lp-card { max-width: 480px; }
  .lp-trust-strip-inner { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
}
@media (max-width: 768px) {
  .lp-header { padding: 0.75rem 1.25rem; }
  .lp-header .site-logo { height: 36px; }
  .lp-header-cta { padding: 0.5rem 1rem; font-size: 0.78rem; }
  .lp-hero { padding: 3rem 1.25rem 3.5rem; }
  .lp-card { padding: 1.5rem; }
  .lp-trust-strip-inner { grid-template-columns: 1fr 1fr; }
  .lp-testimonial blockquote { font-size: 1.05rem; }
  .lp-footer-inner { flex-direction: column; text-align: center; }
}

/* "6 Ways We Help" — auto-scrolling, hover-pause, draggable carousel */
.ways-carousel {
  position: relative;
  overflow: hidden;
  margin-top: 2.5rem;
  padding: 0.5rem 0;
  cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
  user-select: none;
}
.ways-carousel.is-grabbing { cursor: grabbing; }
.ways-carousel-track {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
  align-items: stretch;
}
.ways-carousel-track > .orbit-card {
  flex: 0 0 340px;
  max-width: 340px;
  margin: 0;
}
.ways-carousel-track > .orbit-card img { pointer-events: none; }
@media (max-width: 768px) {
  .ways-carousel-track > .orbit-card { flex: 0 0 80vw; max-width: 80vw; }
}
@media (prefers-reduced-motion: reduce) {
  .ways-carousel {
    overflow-x: auto;
    -webkit-mask-image: none; mask-image: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .ways-carousel-track > .orbit-card { scroll-snap-align: start; }
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem;
  max-width: 720px; margin: 0 auto;
  background: var(--charcoal); color: #fff;
  border-radius: var(--radius-soft);
  padding: 1.2rem 1.4rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  z-index: 9000;
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  transform: translateY(120%);
  transition: transform 0.5s var(--ease-soft);
}
.cookie-banner.is-open { transform: translateY(0); }
.cookie-banner p {
  flex: 1 1 360px;
  font-size: 0.86rem; line-height: 1.55;
  color: rgba(255,255,255,0.85);
}
.cookie-banner p a { color: var(--gold-light); text-decoration: underline; }
.cookie-banner .cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-banner button {
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  border: none; cursor: pointer;
  transition: background-color 0.3s, color 0.3s, transform 0.3s;
}
.cookie-banner .cookie-accept { background: var(--terracotta); color: #fff; }
.cookie-banner .cookie-accept:hover { background: #b86a44; transform: translateY(-1px); }
.cookie-banner .cookie-decline { background: transparent; color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.3); }
.cookie-banner .cookie-decline:hover { background: rgba(255,255,255,0.08); }
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem; }
  .cookie-banner .cookie-actions { justify-content: stretch; }
  .cookie-banner .cookie-actions button { flex: 1; }
}

/* TCPA consent row — used on every form */
.tcpa-row { line-height: 1.55; }
.tcpa-label {
  display: flex; align-items: flex-start; gap: 0.7rem;
  font-size: 0.78rem; color: var(--text-muted);
  cursor: pointer;
}
.tcpa-label input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px; height: 18px;
  accent-color: var(--sage);
  flex-shrink: 0;
}
.tcpa-label a { color: var(--sage); text-decoration: underline; }
.hero-card .tcpa-label { color: var(--charcoal-light); }

/* Progressive funnel form — each step reveals as the prior one is filled */
.funnel-step {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition:
    opacity 0.45s var(--ease-soft),
    max-height 0.55s var(--ease-soft),
    margin-bottom 0.45s var(--ease-soft),
    transform 0.45s var(--ease-soft);
  transform: translateY(-6px);
}
.funnel-step.is-first { opacity: 1; max-height: 220px; margin-bottom: 1rem; transform: translateY(0); }
.funnel-step.is-revealed {
  opacity: 1;
  max-height: 220px;
  margin-bottom: 1rem;
  transform: translateY(0);
}
.funnel-progress {
  display: flex; gap: 0.35rem;
  margin-bottom: 1.2rem;
}
.funnel-progress-dot {
  flex: 1;
  height: 3px;
  background: var(--cream-deep);
  border-radius: 100px;
  transition: background-color 0.4s var(--ease-soft);
}
.funnel-progress-dot.is-active { background: var(--sage); }
.funnel-progress-dot.is-done { background: var(--terracotta); }

.btn-card-submit.is-hidden {
  opacity: 0;
  max-height: 0;
  padding-top: 0; padding-bottom: 0;
  margin-top: 0;
  border-width: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s var(--ease-soft),
    max-height 0.5s var(--ease-soft),
    margin-top 0.4s var(--ease-soft),
    padding 0.4s var(--ease-soft);
}
.btn-card-submit.is-revealed {
  opacity: 1;
  max-height: 80px;
  margin-top: 0.6rem;
}

.funnel-success {
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.funnel-success-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--sage-muted); color: var(--sage);
  display: grid; place-items: center;
  margin: 0 auto 1rem;
  font-size: 1.6rem; font-weight: 700;
}
.funnel-success h3 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.3rem; color: var(--charcoal);
  margin-bottom: 0.4rem;
}
.funnel-success p { font-size: 0.92rem; color: var(--charcoal-mid); line-height: 1.6; }
.funnel-success-continue {
  margin-top: 1.6rem;
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  background: transparent;
  color: var(--sage, #2c4a5e);
  border: 1px solid var(--sage, #2c4a5e);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s var(--ease-soft, ease), color 0.2s var(--ease-soft, ease);
}
.funnel-success-continue:hover,
.funnel-success-continue:focus-visible {
  background: var(--sage, #2c4a5e);
  color: var(--warm-white, #fdfaf3);
  outline: none;
}

/* ---------- Proof / stats ticker ---------- */
.proof-section {
  background: var(--warm-white);
  padding: 1.4rem 5%;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.proof-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2rem; text-align: center;
}
.proof-stat { position: relative; padding: 0.5rem 0; }
.proof-stat:not(:last-child)::after {
  content: ''; position: absolute; right: -1rem; top: 20%;
  width: 1px; height: 60%; background: var(--border-soft);
}
.proof-num { font-family: var(--font-serif); font-weight: 700; font-size: 2rem; color: var(--charcoal); line-height: 1.05; }
.proof-label {
  font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--charcoal-light);
  margin-top: 0.35rem;
}

/* ---------- Rates ticker (live data) ---------- */
.rates-ticker {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.9rem 0 0.4rem;
  overflow: hidden;
  position: relative;
}
.rates-ticker::before, .rates-ticker::after {
  content: ''; position: absolute; top: 0; bottom: 0;
  width: 80px; pointer-events: none; z-index: 2;
}
.rates-ticker::before { left: 0; background: linear-gradient(90deg, var(--warm-white), transparent); }
.rates-ticker::after  { right: 0; background: linear-gradient(-90deg, var(--warm-white), transparent); }
.rates-ticker-track { display: flex; width: max-content; will-change: transform; }
.ticker-set { display: flex; align-items: center; gap: 3rem; flex-shrink: 0; padding: 0 1.5rem; }
.ticker-item {
  display: flex; align-items: baseline; gap: 0.6rem;
  white-space: nowrap;
  font-size: 0.92rem; color: var(--charcoal-mid);
}
.ticker-item strong { font-family: var(--font-serif); font-weight: 700; color: var(--charcoal); font-variant-numeric: tabular-nums; }
.ticker-item .ticker-apr { color: var(--text-muted); font-size: 0.82rem; }
.ticker-divider { width: 4px; height: 4px; border-radius: 50%; background: var(--border-mid); }
.ticker-source {
  text-align: center;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 5%;
}

/* ---------- Testimonials marquee (replaces rate ticker) ---------- */
.testimonials-ticker .rates-ticker-track {
  animation: testimonialsScroll 60s linear infinite;
}
.testimonials-ticker:hover .rates-ticker-track,
.testimonials-ticker:focus-within .rates-ticker-track {
  animation-play-state: paused;
}
@keyframes testimonialsScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-quote {
  display: inline-flex; align-items: center; gap: 0.55rem;
  white-space: nowrap;
  font-size: 0.92rem; color: var(--charcoal-mid);
}
.ticker-quote em {
  font-family: var(--font-serif); font-style: italic;
  color: var(--charcoal); font-weight: 400;
}
.ticker-quote .ticker-stars { color: var(--gold); letter-spacing: 1.5px; font-size: 0.78rem; }
.ticker-quote .ticker-attr  { color: var(--text-muted); font-size: 0.78rem; }

/* ---------- Section base ---------- */
.section { padding: 5.5rem 5%; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-narrow { max-width: 900px; margin: 0 auto; }

.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--sage);
  margin-bottom: 0.9rem;
}
.section-heading {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  line-height: 1.25;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
  max-width: 720px;
}
.section-heading em { color: var(--sage); font-style: italic; font-weight: 400; }
.section-sub {
  font-size: 1.02rem; line-height: 1.7;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 2.5rem;
}
.center { text-align: center; }
.center .section-heading, .center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Loan products grid (replaces orbital carousel for accessibility) ---------- */
.products-section {
  background: var(--cream);
  position: relative;
}
.products-section::before {
  content: ''; position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1920&q=80') center/cover no-repeat;
  opacity: 0.06; pointer-events: none;
}
.products-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.orbit-card {
  background: var(--warm-white);
  border-radius: var(--radius-soft);
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(58,53,48,0.06);
  transition: transform 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
  display: flex; flex-direction: column;
}
.orbit-card:hover { transform: translateY(-4px); box-shadow: 0 18px 48px rgba(58,53,48,0.14); }
.orbit-card .card-image { height: 175px; overflow: hidden; }
.orbit-card .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-soft); }
.orbit-card:hover .card-image img { transform: scale(1.04); }
.orbit-card .card-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.orbit-card .card-body h3 { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; color: var(--charcoal); line-height: 1.3; }
.orbit-card .card-body p { font-size: 0.86rem; color: var(--charcoal-light); line-height: 1.6; flex: 1; }
.card-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; font-weight: 600;
  color: var(--sage);
  margin-top: 0.4rem;
  transition: gap 0.3s, color 0.3s;
}
.card-link span { transition: transform 0.3s; }
.card-link:hover { color: var(--terracotta); }
.card-link:hover span { transform: translateX(4px); }

/* ---------- Process timeline ---------- */
.process-section { background: var(--cream-deep); }
.process-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  margin-top: 2.5rem;
}
.process-grid::before {
  content: ''; position: absolute; top: 26px; left: 12.5%; right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sage) 20%, var(--sage) 80%, transparent);
  opacity: 0.4;
}
.process-step { text-align: center; position: relative; z-index: 1; padding: 0 0.5rem; }
.step-number {
  width: 52px; height: 52px;
  border: 1.5px solid var(--sage);
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--sage);
  font-family: var(--font-serif); font-weight: 700; font-size: 1rem;
  display: grid; place-items: center;
  margin: 0 auto 1.2rem;
  transition: background-color 0.3s, color 0.3s;
}
.process-step:hover .step-number { background: var(--sage); color: #fff; }
.process-step h4 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.1rem; color: var(--charcoal); margin-bottom: 0.4rem;
}
.process-step p { font-size: 0.86rem; color: var(--charcoal-light); max-width: 220px; margin: 0 auto; line-height: 1.6; }

/* ---------- Calculator ---------- */
.calc-section {
  background: var(--cream);
  position: relative; overflow: hidden;
}
.calc-section::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--sage-muted), transparent 70%);
  pointer-events: none; opacity: 0.6;
}
.calc-inner { position: relative; max-width: 880px; margin: 0 auto; }
.calc-tabs {
  display: inline-flex;
  background: var(--warm-white);
  border-radius: var(--radius-pill);
  padding: 0.3rem;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-warm);
}
.calc-tab {
  padding: 0.55rem 1.2rem;
  border: none; background: transparent;
  border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 500;
  color: var(--charcoal-mid);
  transition: background-color 0.3s, color 0.3s;
}
.calc-tab:hover { color: var(--sage); }
.calc-tab.active { background: var(--sage); color: #fff; }

.calc-card {
  background: var(--warm-white);
  border-radius: var(--radius-soft);
  padding: 2.5rem;
  box-shadow: var(--shadow-warm);
}
.calc-panel { display: none; }
.calc-panel.active { display: block; animation: fadeUp 0.4s var(--ease-soft); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.calc-row.full { grid-template-columns: 1fr; }
.calc-field label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--charcoal-mid);
  margin-bottom: 0.5rem;
}
.calc-field .field-value {
  text-transform: none; letter-spacing: 0;
  font-family: var(--font-serif); font-weight: 700; font-size: 0.95rem;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}
.calc-field input[type="range"] {
  width: 100%; -webkit-appearance: none; appearance: none;
  background: var(--cream-deep);
  height: 6px; border-radius: 3px;
}
.calc-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sage);
  border: 3px solid var(--warm-white);
  box-shadow: var(--shadow-warm);
  transition: transform 0.2s;
}
.calc-field input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.calc-field input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sage); border: 3px solid var(--warm-white);
  box-shadow: var(--shadow-warm);
}
.calc-field select, .calc-field input[type="number"], .calc-field input[type="text"] {
  width: 100%;
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-family: inherit; font-size: 0.92rem;
  color: var(--charcoal);
}
.calc-field select:focus, .calc-field input:focus { outline: none; border-color: var(--sage); background: var(--warm-white); }

.calc-result {
  background: linear-gradient(135deg, var(--sage-muted), var(--cream-deep));
  border-radius: var(--radius-soft);
  padding: 1.4rem 1.8rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  margin-top: 0.5rem;
}
.calc-result-label {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--charcoal-mid);
}
.calc-result-amount {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 2rem; color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}
.calc-result-detail { font-size: 0.85rem; color: var(--charcoal-light); margin-top: 0.2rem; }
.calc-result-cta {
  background: var(--sage); color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600;
  transition: background-color 0.3s, transform 0.3s;
  white-space: nowrap;
}
.calc-result-cta:hover { background: var(--sage-light); transform: translateY(-1px); }
.calc-disclaimer {
  font-size: 0.78rem; color: var(--text-muted);
  text-align: center; margin-top: 1.4rem; line-height: 1.6;
}

/* ---------- Team / editorial split ---------- */
.team-section { background: var(--cream); }
.team-layout { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: center; }
.team-editorial h3 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.7rem; line-height: 1.3;
  color: var(--charcoal); margin-bottom: 1.2rem;
}
.team-editorial h3 em { color: var(--sage); font-style: italic; font-weight: 400; }
.team-editorial p { font-size: 0.98rem; color: var(--charcoal-mid); line-height: 1.8; margin-bottom: 1rem; }

.team-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem;
}
.team-member-card {
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-soft);
  padding: 1.6rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.team-member-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-warm); border-color: var(--sage-light); }
.team-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--sage-muted);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 700;
  color: var(--sage); font-size: 1.4rem;
  margin: 0 auto 0.9rem;
}
.team-member-card h4 { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; color: var(--charcoal); margin-bottom: 0.2rem; }
.team-member-card .team-title { font-size: 0.82rem; color: var(--charcoal-light); }
.team-member-card .team-nmls { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ---------- Testimonials ---------- */
.testimonials-section {
  background: var(--cream-deep);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.testimonials-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 2.5rem;
}
.testimonial-card {
  background: var(--cream);
  padding: 2rem;
  border-radius: var(--radius-soft);
  border: 1px solid var(--border-soft);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
}
.testimonial-card::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 3.5rem; line-height: 1;
  color: var(--sage-light);
  opacity: 0.5;
  position: absolute; top: 0.6rem; left: 1.4rem;
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--sage-light); }
.testimonial-text {
  font-family: var(--font-serif); font-style: italic;
  font-size: 0.96rem; line-height: 1.75;
  color: var(--charcoal);
  margin: 1.2rem 0 1.4rem;
  position: relative; z-index: 1;
}
.testimonial-author { display: flex; align-items: center; gap: 0.8rem; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sage-muted);
  display: grid; place-items: center;
  font-weight: 600; font-size: 0.85rem; color: var(--sage);
}
.testimonial-name { font-size: 0.88rem; font-weight: 600; color: var(--charcoal); line-height: 1.2; }
.testimonial-meta { font-size: 0.78rem; color: var(--text-muted); }
.testimonial-stars { color: var(--gold); letter-spacing: 2px; font-size: 0.85rem; margin-bottom: 0.4rem; }

/* ---------- FAQ ---------- */
.faq-section { background: var(--cream); }
.faq-layout { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item {
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.faq-item.active { border-color: var(--sage-light); box-shadow: var(--shadow-warm); }
.faq-question {
  width: 100%;
  background: transparent; border: none;
  padding: 1.2rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-serif); font-weight: 700; font-size: 0.96rem;
  color: var(--charcoal);
  text-align: left;
  transition: color 0.3s;
}
.faq-question:hover { color: var(--sage); }
.faq-toggle {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--sage-muted);
  color: var(--sage);
  display: grid; place-items: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: background-color 0.3s, color 0.3s, transform 0.3s;
}
.faq-item.active .faq-toggle { background: var(--sage); color: #fff; transform: rotate(45deg); }

/* Smooth open/close. We animate the wrapping grid track from 0fr → 1fr,
   which reveals the inner element's natural height — no JS height-measuring
   required. The inner element is the overflow container. */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.active .faq-answer { grid-template-rows: 1fr; }

.faq-answer-inner {
  overflow: hidden;
  min-height: 0;                /* required so the grid item can shrink below content height */
  padding: 0 1.4rem 1.2rem;
  font-size: 0.9rem;
  color: var(--charcoal-light);
  line-height: 1.75;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.active .faq-answer-inner {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

/* Fallback for older browsers that can't animate grid-template-rows
   (Chrome <115, Safari <17, Firefox <122). */
@supports not (transition: grid-template-rows 0.4s) {
  .faq-answer { display: block; max-height: 0; overflow: hidden; transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1); }
  .faq-item.active .faq-answer { max-height: 1500px; }
  .faq-answer-inner { overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-answer, .faq-answer-inner { transition: none; }
}

/* ---------- CTA banner ---------- */
.cta-section {
  padding: 4.5rem 5%;
  background: var(--charcoal);
  position: relative; overflow: hidden;
  text-align: center;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(44,74,94,0.25) 0%, transparent 60%);
  pointer-events: none;
}
.cta-inner { position: relative; max-width: 680px; margin: 0 auto; color: #fff; }
.cta-heading {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.25;
  margin-bottom: 0.9rem;
}
.cta-heading em { color: var(--gold-light); font-style: italic; font-weight: 400; }
.cta-sub { font-size: 1rem; color: rgba(255,255,255,0.7); margin-bottom: 1.8rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.6);
  padding: 3.5rem 5% 1.6rem;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand h4 { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; color: #fff; margin-bottom: 0.7rem; }
.footer-brand-sub { font-size: 0.82rem; max-width: 280px; line-height: 1.7; color: rgba(255,255,255,0.45); }
.site-footer h5 {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1rem;
}
.site-footer ul li { margin-bottom: 0.5rem; }
.site-footer a {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  transition: color 0.3s;
}
.site-footer a:hover { color: var(--gold-light); }
.site-footer address { font-style: normal; font-size: 0.82rem; color: rgba(255,255,255,0.5); line-height: 1.7; }
.footer-bottom {
  padding-top: 1.4rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem;
  font-size: 0.72rem; color: rgba(255,255,255,0.4);
}
.footer-legal-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-legal-links a { font-size: 0.72rem; color: rgba(255,255,255,0.5); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  position: relative;
  padding: 9rem 5% 4rem;
  background: linear-gradient(135deg, rgba(58,53,48,0.75), rgba(44,74,94,0.55)),
              url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1920&q=80') center/cover no-repeat;
  color: #fff;
  text-align: center;
}
.page-hero .breadcrumb {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,0.85); }
.page-hero .breadcrumb a:hover { color: var(--gold-light); }
.page-hero .breadcrumb-sep { margin: 0 0.5rem; opacity: 0.5; }
.page-hero h1 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.2;
  margin: 0 auto 1rem; max-width: 780px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.page-hero h1 em { color: var(--gold-light); font-style: italic; font-weight: 400; }
.page-hero p { font-size: 1.05rem; color: rgba(255,255,255,0.85); max-width: 640px; margin: 0 auto; line-height: 1.7; }

/* ---------- Feature lists, fact tiles ---------- */
.feature-list { display: grid; gap: 0.85rem; margin: 1.4rem 0; }
.feature-list li {
  position: relative; padding-left: 1.6rem;
  color: var(--charcoal-mid); line-height: 1.7; font-size: 0.96rem;
}
.feature-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--terracotta); font-weight: 700;
}

.fact-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem; margin: 2.5rem 0;
}
.fact-tile {
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-soft);
  padding: 1.6rem 1.4rem;
}
.fact-tile-label {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.8px;
  color: var(--charcoal-light); margin-bottom: 0.5rem;
}
.fact-tile-value {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.6rem; color: var(--charcoal);
}
.fact-tile-detail { font-size: 0.85rem; color: var(--charcoal-light); margin-top: 0.4rem; line-height: 1.6; }

/* ---------- Apply Funnel (apf-*) — modal popup with blurred page behind ---------- */
.apf-modal {
  position: fixed; inset: 0;
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 5rem 1.25rem 2rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease-soft, cubic-bezier(.4,0,.2,1));
}
.apf-modal.is-open { opacity: 1; pointer-events: auto; }

/* Backdrop: blurs whatever page content sits behind, no color tint */
.apf-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(58, 53, 48, 0.22);   /* very light charcoal mute so the card pops; pure blur reads as ghostly without it */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.35s var(--ease-soft, cubic-bezier(.4,0,.2,1));
}
.apf-modal.is-open .apf-modal-backdrop { opacity: 1; }

/* Card: clean light surface, no glassy tint */
.apf-card {
  position: relative;
  width: 100%; max-width: 640px;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  background: var(--cream, #faf6ef);
  border: 1px solid rgba(58, 53, 48, 0.1);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28), 0 8px 24px rgba(58,53,48,0.12);
  padding: 2rem 2.25rem 1.75rem;
  color: var(--charcoal, #2a2520);
  transform: translateY(14px) scale(0.985);
  transition:
    transform 0.45s var(--ease-soft, cubic-bezier(.34,1.2,.4,1)),
    opacity 0.35s var(--ease-soft, cubic-bezier(.4,0,.2,1));
  opacity: 0;
}
.apf-modal.is-open .apf-card { transform: translateY(0) scale(1); opacity: 1; }

.apf-close {
  position: absolute; top: 0.85rem; right: 0.85rem;
  width: 36px; height: 36px; border-radius: 999px;
  background: transparent; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--charcoal-mid, #5a5550);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.apf-close:hover { background: rgba(58,53,48,0.08); color: var(--charcoal); border-color: rgba(58,53,48,0.15); }
.apf-close svg { width: 18px; height: 18px; }

.apf-card-head { margin-bottom: 1.5rem; padding-right: 2.5rem; }
.apf-progress { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.apf-progress-bar {
  flex: 1; height: 5px; border-radius: 999px;
  background: rgba(58, 53, 48, 0.1);
  overflow: hidden;
}
.apf-progress-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--sage, #2c4a5e), var(--terracotta, #c67a52));
  width: 25%;
  border-radius: 999px;
  transition: width 0.45s var(--ease-soft, cubic-bezier(.4,0,.2,1));
}
.apf-progress-meta {
  font-size: 0.74rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--charcoal-mid, #5a5550);
  font-weight: 600;
}

.apf-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.8vw, 1.95rem);
  line-height: 1.2; margin: 0 0 0.35rem;
  color: var(--charcoal, #2a2520);
  font-weight: 400;
}
.apf-title em { font-style: italic; color: var(--sage, #2c4a5e); }
.apf-sub { font-size: 0.95rem; color: var(--charcoal-mid, #5a5550); margin: 0; }

/* Step transitions */
.apf-step {
  display: none;
  opacity: 0;
  transform: translateY(6px);
}
.apf-step.is-active {
  display: block;
  animation: apfStepIn 0.4s var(--ease-soft, cubic-bezier(.4,0,.2,1)) forwards;
}
@keyframes apfStepIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.apf-step-head { margin-bottom: 1rem; }
.apf-step-eyebrow {
  display: inline-block;
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terracotta, #c67a52);
  margin-bottom: 0.3rem;
  font-weight: 700;
}
.apf-step-head h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem; line-height: 1.3; margin: 0;
  color: var(--charcoal, #2a2520); font-weight: 400;
}

.apf-field { margin-bottom: 1rem; }
.apf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.apf-row .apf-field { margin-bottom: 1rem; }
.apf-label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--charcoal, #2a2520);
  margin-bottom: 0.35rem;
}
.apf-input {
  width: 100%;
  padding: 0.78rem 1rem;
  background: var(--cream-deep, #f3ece0);
  border: 1px solid rgba(58, 53, 48, 0.14);
  border-radius: 8px;
  color: var(--charcoal, #2a2520);
  font-size: 0.97rem; font-family: inherit;
  transition: background 0.18s, border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.apf-input:hover {
  background: #ece3d2; /* slightly deeper tan on hover */
  border-color: rgba(58, 53, 48, 0.22);
}
select.apf-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232a2520' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center, 0 0;
  padding-right: 2.2rem;
}
.apf-input:focus {
  outline: none;
  background: #fffaf2; /* lighten on focus so user clearly sees input state */
  border-color: var(--sage, #2c4a5e);
  box-shadow: 0 0 0 3px rgba(44, 74, 94, 0.18);
}

.apf-tcpa { margin-top: 0.8rem; }
.apf-tcpa .tcpa-label {
  color: var(--charcoal-mid, #5a5550);
  font-size: 0.78rem; line-height: 1.55;
}

.apf-footer {
  display: flex; gap: 0.7rem; align-items: center;
  margin-top: 1.4rem;
}
.apf-back, .apf-next, .apf-submit {
  font-family: inherit;
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.78rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.apf-back {
  background: transparent;
  border-color: rgba(58, 53, 48, 0.25);
  color: var(--charcoal-mid, #5a5550);
}
.apf-back:hover { background: rgba(58, 53, 48, 0.06); color: var(--charcoal, #2a2520); }
.apf-next, .apf-submit {
  background: var(--sage, #2c4a5e); color: #fff;
  margin-left: auto;
  box-shadow: 0 8px 20px rgba(44, 74, 94, 0.22);
}
.apf-next:hover, .apf-submit:hover {
  transform: translateY(-1px);
  background: var(--sage-light, #3e5e74);
  box-shadow: 0 12px 26px rgba(44, 74, 94, 0.3);
}
.apf-trust {
  text-align: center;
  font-size: 0.74rem;
  color: var(--charcoal-light, #8a8480);
  margin: 1.2rem 0 0;
  letter-spacing: 0.04em;
}

.apf-step.has-error .apf-input { border-color: var(--terracotta, #c67a52); box-shadow: 0 0 0 3px rgba(198, 122, 82, 0.18); }

/* Lock background scroll while modal open */
body.apf-modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .apf-modal { padding: 3.5rem 0.75rem 1.5rem; }
  .apf-card { padding: 1.6rem 1.25rem 1.25rem; border-radius: 14px; max-height: calc(100vh - 5rem); }
  .apf-row { grid-template-columns: 1fr; }
  .apf-footer { flex-direction: column-reverse; align-items: stretch; }
  .apf-footer .apf-next, .apf-footer .apf-submit, .apf-footer .apf-back { width: 100%; margin: 0; }
}

/* Backdrop-filter fallback */
@supports not (backdrop-filter: blur(1px)) {
  .apf-modal-backdrop { background: rgba(58, 53, 48, 0.55); }
}

/* ---------- Loan product (lo-*) detail pages ---------- */
/* Compact spacing across loan-options product pages */
.lo-compact .section { padding: 3rem 5%; }
.lo-compact .page-hero { padding: 6.5rem 5% 2.25rem; }
.lo-compact .faq-section { padding: 3rem 5%; }
.lo-compact .cta-section { padding: 3rem 5%; }
.lo-compact .cross-sell { padding: 2.25rem 5%; }
.lo-compact .section-heading { margin-bottom: 0.75rem; }
.lo-compact .faq-layout { gap: 2.5rem; }

/* Two-column program-overview + lead-funnel layout */
.lo-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 3rem;
  align-items: start;
}
.lo-overview-text { padding-top: 0.25rem; }
.lo-lead-card { position: sticky; top: 130px; }
@media (max-width: 960px) {
  .lo-overview-layout { grid-template-columns: 1fr; gap: 2rem; }
  .lo-lead-card { position: static; }
}

.cross-sell {
  background: var(--cream-deep);
  padding: 3rem 5%;
}
.cross-sell-inner { max-width: var(--max-w); margin: 0 auto; }
.cross-sell-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.cross-sell-card {
  display: block;
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-soft);
  padding: 2rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.cross-sell-card:hover { transform: translateY(-3px); border-color: var(--sage-light); box-shadow: var(--shadow-warm); }
.cross-sell-card .section-eyebrow { color: var(--terracotta); margin-bottom: 0.4rem; }
.cross-sell-card h3 { font-family: var(--font-serif); font-weight: 700; font-size: 1.3rem; color: var(--charcoal); margin-bottom: 0.5rem; }
.cross-sell-card p { font-size: 0.9rem; color: var(--charcoal-light); line-height: 1.6; }

/* ---------- Region cards / contact / split ---------- */
.region-card {
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-soft);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.region-card-inner { display: grid; grid-template-columns: 1fr 1.6fr; }
.region-card img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.region-card-body { padding: 2rem; }
.region-card-body h3 { font-family: var(--font-serif); font-weight: 700; font-size: 1.4rem; color: var(--charcoal); margin-bottom: 0.5rem; }
.region-card-body p { font-size: 0.95rem; color: var(--charcoal-mid); line-height: 1.7; margin-bottom: 0.8rem; }

.office-card {
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-soft);
  padding: 2rem;
}
.office-card h3 { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; color: var(--charcoal); margin-bottom: 0.6rem; }
.office-card address { font-style: normal; color: var(--charcoal-mid); line-height: 1.7; font-size: 0.95rem; }
.office-meta { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-soft); font-size: 0.9rem; color: var(--charcoal-mid); }
.office-meta a { color: var(--sage); font-weight: 600; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }

/* Trust band (used on Apply) */
.trust-band {
  background: var(--cream-deep);
  padding: 2.5rem 5%;
  text-align: center;
}
.trust-band p { max-width: 720px; margin: 0 auto; font-size: 0.92rem; color: var(--charcoal-light); line-height: 1.7; }

/* ---------- Polish: skeleton, errors, fade-up, count-up, back-to-top ---------- */

/* Initial skeleton state for the rates ticker before JS hydrates */
.ticker-set:empty::before {
  content: '';
  display: inline-block;
  width: 220px; height: 1.3rem;
  background: linear-gradient(90deg, var(--cream-deep), var(--sage-muted), var(--cream-deep));
  background-size: 220% 100%;
  border-radius: 4px;
  animation: tickerShimmer 1.4s linear infinite;
  margin: 0 1rem;
}
@keyframes tickerShimmer {
  0%   { background-position: 0% 0%; }
  100% { background-position: -220% 0%; }
}

/* Form error states on the hero funnel inputs */
.form-input.is-error,
.form-select.is-error {
  border-color: var(--terracotta);
  background: rgba(198, 122, 82, 0.06);
}
.form-error-msg {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.75rem; color: var(--terracotta);
  letter-spacing: 0.2px;
}
.funnel-step.has-error .form-error-msg { display: block; }
.funnel-step.has-error .form-input,
.funnel-step.has-error .form-select { border-color: var(--terracotta); }

/* Scroll fade-up — applied to anything with .reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Stats number pop on view */
.proof-num.count-up { font-variant-numeric: tabular-nums; }

/* Back-to-top button */
.back-to-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--sage); color: #fff;
  border: none; cursor: pointer;
  display: grid; place-items: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-warm);
  opacity: 0; transform: translateY(10px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-soft), transform 0.3s var(--ease-soft), background-color 0.3s;
  z-index: 900;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { background: var(--sage-light); }
@media (max-width: 768px) {
  .back-to-top { right: 1rem; bottom: 1rem; width: 40px; height: 40px; }
}

/* Homes / mock listings grid (uses .orbit-card for the base card) */
.homes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  max-width: 1080px;
  margin: 2.5rem auto 0;
}
@media (max-width: 768px) { .homes-grid { grid-template-columns: 1fr; max-width: 540px; } }

.home-card { position: relative; }
.home-card .card-image { height: 220px; }

.home-status {
  position: absolute; top: 1rem; left: 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  z-index: 2;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.home-status.closed     { background: rgba(44, 74, 94, 0.92);   color: #fff; }
.home-status.in-escrow  { background: rgba(198, 122, 82, 0.92); color: #fff; }
.home-status.preapproved{ background: rgba(255, 253, 249, 0.92);color: var(--charcoal); border: 1px solid var(--border-soft); }

.home-meta {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.home-price {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.5rem; color: var(--charcoal);
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}
.home-city { font-size: 0.82rem; color: var(--charcoal-light); }

.home-stats {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--charcoal-mid);
  padding: 0.6rem 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin: 0.5rem 0 0.8rem;
}
.home-stats span { display: inline-flex; align-items: center; gap: 0.3rem; font-variant-numeric: tabular-nums; }
.home-stats strong { font-weight: 600; color: var(--charcoal); }

.home-loan {
  font-size: 0.82rem;
  color: var(--charcoal-mid);
  margin-bottom: 0.3rem;
}
.home-loan strong { color: var(--sage); font-weight: 600; }
.home-payment {
  font-size: 0.82rem;
  color: var(--charcoal-light);
  margin-bottom: 0.8rem;
}
.home-payment strong {
  font-family: var(--font-serif); font-weight: 700;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.homes-filters {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.homes-filter {
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.2rem;
  font-family: inherit;
  font-size: 0.85rem; font-weight: 500;
  color: var(--charcoal-mid);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.homes-filter:hover { color: var(--sage); border-color: var(--sage-light); }
.homes-filter.active { background: var(--sage); color: #fff; border-color: var(--sage); }

.homes-disclaimer {
  text-align: center;
  max-width: 640px; margin: 2rem auto 0;
  padding-top: 1.5rem; border-top: 1px solid var(--border-soft);
  font-size: 0.78rem; color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-bg { animation: none; }
  .rates-ticker-track { animation: none !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-card { max-width: 480px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .team-layout, .faq-layout { grid-template-columns: 1fr; gap: 2rem; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .fact-row { grid-template-columns: 1fr 1fr; }
  .region-card-inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cross-sell-grid { grid-template-columns: 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .nav-links, .nav-phone { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav { display: block; }
  .header-inner { gap: 1rem; }
  .nav-cta { padding: 0.55rem 1.1rem; font-size: 0.78rem; }

  .hero-section { min-height: 80vh; padding: 7rem 1.25rem 3rem; }
  .hero-inner { gap: 2rem; }
  .hero-h1 { font-size: 2.2rem; line-height: 1.2; }
  .hero-card { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-warm, .btn-warm-outline { width: 100%; justify-content: center; }

  .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .proof-stat:nth-child(2)::after, .proof-stat:nth-child(4)::after { content: none; }

  .section { padding: 4rem 1.25rem; }
  .section-heading { font-size: 1.7rem; }

  .products-grid, .team-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid::before { content: none; }

  .calc-card { padding: 1.5rem; }
  .calc-row { grid-template-columns: 1fr; gap: 1rem; }
  .calc-tabs { display: flex; overflow-x: auto; max-width: 100%; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .footer-bottom { flex-direction: column; }
  .fact-row { grid-template-columns: 1fr; }

  .cta-section, .trust-band { padding: 3rem 1.25rem; }
  .page-hero { padding: 7rem 1.25rem 3rem; }
}

/* ============================================================
   MOBILE POLISH PASS — overrides for tight phone screens
   Targets: ≤ 768px (tablets in portrait + phones)
   ============================================================ */

/* Global hygiene — prevent any horizontal scroll */
html, body { overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; height: auto; }

@media (max-width: 768px) {
  /* --- Header / logo --- */
  .site-header { padding: 0.4rem 4%; }
  .site-header.scrolled { padding: 0.25rem 4%; }
  .site-logo { height: 46px; }
  .site-header.scrolled .site-logo { height: 40px; }
  .header-inner { gap: 0.5rem; }

  /* --- Page hero typography --- */
  .page-hero { padding: 6rem 1.25rem 2.25rem; }
  .page-hero h1 { font-size: clamp(1.6rem, 7vw, 2.1rem); line-height: 1.2; }
  .page-hero p { font-size: 0.98rem; }
  .breadcrumb { font-size: 0.72rem; }

  /* --- Hero (homepage) --- */
  .hero-h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .hero-eyebrow { font-size: 0.75rem; }
  .hero-card { padding: 1.4rem 1.25rem; border-radius: 14px; }
  .hero-card-title { font-size: 1.25rem; }

  /* --- Section spacing tightened --- */
  .section { padding: 2.75rem 1.25rem !important; }
  .section-narrow { padding-left: 0; padding-right: 0; }
  .section-heading { font-size: clamp(1.5rem, 5.5vw, 1.85rem); line-height: 1.25; }
  .section-sub { font-size: 0.95rem; }

  /* --- Inline 2-col grids — force stack on mobile --- */
  /* buy-a-home editorial + testimonial */
  .section [style*="grid-template-columns: 1.1fr 1fr"] { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  /* contact: office + map */
  .contact-grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  /* 30-year-fixed: Best for / Alternative panels */
  .section [style*="grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem"] { grid-template-columns: 1fr !important; gap: 1rem !important; }

  /* --- Generic fact-row / products-grid stacking --- */
  .fact-row { grid-template-columns: 1fr !important; gap: 0.85rem; }
  .products-grid { grid-template-columns: 1fr !important; gap: 1.25rem; }
  .products-grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* --- Loan product detail (lo-*) extra tightening --- */
  .lo-compact .section { padding: 2.25rem 1.25rem !important; }
  .lo-compact .page-hero { padding: 5.5rem 1.25rem 2rem; }
  .lo-overview-layout { grid-template-columns: 1fr !important; gap: 1.5rem; }
  .lo-lead-card { position: static; }
  .lo-overview-text .btn-cta-primary,
  .lo-overview-text .btn-cta-secondary { width: 100%; text-align: center; justify-content: center; }

  /* --- Form & input touch targets (44px+) --- */
  .form-input, .form-select, .apf-input,
  input[type="text"], input[type="email"], input[type="tel"], select, textarea {
    min-height: 46px; font-size: 16px;  /* 16px prevents iOS auto-zoom on focus */
  }
  .form-row { grid-template-columns: 1fr; }
  .form-label, .apf-label { font-size: 0.86rem; }

  /* --- Buttons: full-width on mobile, larger tap --- */
  .btn-cta-primary, .btn-cta-secondary, .btn-card-submit, .btn-warm, .btn-warm-outline {
    min-height: 48px; width: 100%; justify-content: center;
  }
  .cta-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .cta-actions a { width: 100%; text-align: center; }

  /* --- FAQ — keep titles readable, more breathing room --- */
  .faq-question { padding: 1rem 0; font-size: 0.98rem; }
  .faq-question span:first-child { padding-right: 1rem; }
  .faq-answer-inner { font-size: 0.95rem; }

  /* --- Cross-sell cards stack --- */
  .cross-sell-grid { grid-template-columns: 1fr !important; gap: 1rem; }
  .cross-sell-card { padding: 1.4rem 1.25rem; }
  .cross-sell-card h3 { font-size: 1.2rem; }

  /* --- Footer — already 2 columns, tighten further --- */
  .footer-inner { padding: 2.5rem 1.25rem 1.5rem; }
  .footer-grid { gap: 1.4rem; }
  .footer-brand-sub, .footer-grid ul { font-size: 0.92rem; }

  /* --- Refinance custom layouts --- */
  .refi-intro-layout { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .refi-reasons { padding: 1.4rem 1.25rem !important; }

  /* --- Apply modal — already mobile-aware, just verify min-padding --- */
  .apf-modal { padding: 3rem 0.65rem 1rem; }
  .apf-card { padding: 1.4rem 1.1rem 1.1rem; max-height: calc(100vh - 4rem); }
  .apf-title { font-size: clamp(1.25rem, 5.5vw, 1.65rem); }
  .apf-step-head h2 { font-size: 1.1rem; }

  /* --- Maps / iframes shouldn't overflow --- */
  .map-wrap iframe { min-height: 280px; max-height: 60vh; }

  /* --- Calculator cards --- */
  .calc-card { border-radius: 14px; padding: 1.25rem; }
  .calc-tab { font-size: 0.82rem; padding: 0.6rem 0.9rem; }
  .calc-result { flex-direction: column; align-items: stretch; gap: 0.8rem; text-align: left; }
  .calc-result-cta { width: 100%; text-align: center; }
  .piti-grid { grid-template-columns: 1fr 1fr; }

  /* --- Mobile nav itself --- */
  .mobile-nav { padding: 5.5rem 1.25rem 2rem; }
  .mobile-nav a { padding: 0.9rem 0; font-size: 1rem; }

  /* --- Testimonial editorial cards --- */
  .testimonial-card, .team-member-card { padding: 1.4rem 1.25rem !important; }
}

/* Phones smaller than 380px (older iPhones, narrow Androids) */
@media (max-width: 380px) {
  .site-logo { height: 42px; }
  .site-header.scrolled .site-logo { height: 36px; }
  .nav-cta { padding: 0.5rem 0.9rem; font-size: 0.74rem; }
  .hero-h1, .page-hero h1 { font-size: 1.6rem; }
  .section-heading { font-size: 1.45rem; }
  .apf-card { padding: 1.2rem 0.9rem 1rem; }
  .apf-progress-meta { font-size: 0.68rem; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .rates-ticker, .proof-section, .cta-section, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ---------- Cookie consent banner ---------- */
.cf-consent {
  position: fixed;
  z-index: 2000;
  bottom: 1.2rem;
  right: 1.2rem;
  max-width: 380px;
  background: var(--warm-white, #fffaf2);
  border: 1px solid var(--border-soft, rgba(42,37,32,0.12));
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(42,37,32,0.16);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.32s var(--ease-soft, cubic-bezier(.4,0,.2,1)),
              transform 0.32s var(--ease-soft, cubic-bezier(.4,0,.2,1));
  pointer-events: none;
}
.cf-consent.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cf-consent-inner {
  padding: 1.1rem 1.2rem 1.1rem;
}
.cf-consent-text {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--charcoal-mid, #4a443d);
  margin: 0 0 0.85rem;
}
.cf-consent-text a {
  color: var(--sage, #2c4a5e);
  text-decoration: underline;
}
.cf-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}
.cf-consent-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.05rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: background 0.18s, color 0.18s, opacity 0.18s;
}
.cf-consent-btn.cf-consent-decline {
  background: transparent;
  color: var(--charcoal-mid, #4a443d);
}
.cf-consent-btn.cf-consent-decline:hover { color: var(--charcoal, #2a2520); }
.cf-consent-btn.cf-consent-accept {
  background: var(--sage, #2c4a5e);
  color: #fff;
}
.cf-consent-btn.cf-consent-accept:hover { opacity: 0.92; }

@media (max-width: 600px) {
  .cf-consent { left: 0.9rem; right: 0.9rem; bottom: 0.9rem; max-width: none; }
  .cf-consent-actions { justify-content: stretch; }
  .cf-consent-btn { flex: 1; padding: 0.65rem; font-size: 0.86rem; }
}

/* ---------- Anti-spam honeypot ----------
   The .cf-hp input is invisible to humans but visible to dumb bots.
   Bots that auto-fill all text inputs trigger silent rejection server-side.
   Positioned off-screen (preferred over display:none — some bots skip
   hidden fields specifically).
   IMPORTANT: must override mobile touch-target rules which set
   min-height: 46px on all text inputs (a different property than height). */
.cf-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 1px !important;
  max-height: 1px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
