/* =========================================================
   TMES — The Mortgage Exchange Service
   Design System
   ========================================================= */

:root {
  /* Core palette — calm, premium, trustworthy */
  --navy-900: #0B2545;          /* primary brand */
  --navy-800: #13305C;
  --navy-700: #1C3D73;
  --teal-700: #13505B;          /* deep teal accent */
  --teal-600: #1C6C78;
  --teal-50:  #E8F1F2;

  --warm-white: #FAF7F2;        /* page background */
  --white: #FFFFFF;
  --gray-50:  #F4F5F7;
  --gray-100: #E9EBEF;
  --gray-200: #D7DCE3;
  --gray-400: #9AA3B2;
  --gray-600: #5B6677;
  --gray-800: #2A3342;

  --accent-gold: #C9A961;       /* restrained accent */
  --accent-gold-soft: #F3E9D0;

  --success: #2F7D5B;
  --warning: #B4651E;
  --danger:  #A8342B;

  /* Type */
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale */
  --s-1: .25rem;
  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;
  --s-24: 6rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, .06), 0 1px 3px rgba(11, 37, 69, .04);
  --shadow:    0 6px 24px rgba(11, 37, 69, .08), 0 2px 6px rgba(11, 37, 69, .04);
  --shadow-lg: 0 18px 48px rgba(11, 37, 69, .12), 0 6px 16px rgba(11, 37, 69, .06);
}

/* Reset */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--warm-white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--navy-900); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* Type */
h1,h2,h3,h4 {
  font-family: var(--font-serif);
  color: var(--navy-900);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 var(--s-4);
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p  { margin: 0 0 var(--s-4); }
.lead { font-size: 1.15rem; color: var(--gray-600); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: var(--s-3);
}

/* Layout helpers */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-6); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--s-6); }
.section { padding: var(--s-20) 0; }
.section-tight { padding: var(--s-12) 0; }
.section-bg-soft { background: var(--white); }
.section-bg-navy { background: var(--navy-900); color: var(--gray-100); }
.section-bg-navy h1,.section-bg-navy h2,.section-bg-navy h3 { color: var(--white); }
.section-bg-teal { background: var(--teal-50); }
.grid { display: grid; gap: var(--s-6); }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy-900); color: white;
  padding: var(--s-3) var(--s-4); z-index: 100;
}
.skip-link:focus { left: 0; }

/* =========================================================
   Utility bar + header
   ========================================================= */
.utility-bar {
  background: var(--navy-900);
  color: var(--gray-100);
  font-size: .82rem;
  padding: var(--s-2) 0;
}
.utility-bar .container {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  flex-wrap: wrap;
}
.utility-bar a { color: var(--gray-100); }
.utility-bar .utility-left { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.utility-bar .utility-right { display: flex; gap: var(--s-5); align-items: center; }
.utility-bar .eho {
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.utility-bar .eho::before {
  content: "⌂"; display: inline-block; width: 18px; height: 18px;
  border: 1.5px solid currentColor; border-radius: 3px; text-align: center;
  line-height: 16px; font-size: 12px;
}

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--gray-100);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--s-3); padding-bottom: var(--s-3);
  gap: var(--s-6);
}
.logo {
  display: flex; align-items: center; gap: var(--s-3);
  color: var(--navy-900); text-decoration: none;
}
.logo:hover { text-decoration: none; }

/* Real TMES badge logo — sized to stand out in the header */
.logo-img {
  height: 112px;
  width: 112px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.logo:hover .logo-img { transform: scale(1.03); }

/* Slightly smaller in utility-bar-adjacent mobile view */
@media (max-width: 640px) {
  .logo-img { height: 64px; }
}

/* Footer variant: logo sits on dark; white background of logo forms a crisp badge */
.footer .logo-img {
  height: 96px;
  width: 96px;
  object-fit: contain;
  flex-shrink: 0;
  background: white;
  padding: 8px;
  border-radius: 12px;
}

.nav {
  display: flex; gap: var(--s-1); align-items: center;
}
.nav a {
  color: var(--gray-800); text-decoration: none;
  padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 500;
}
.nav a:hover { background: var(--gray-50); color: var(--navy-900); text-decoration: none; }
.nav a.active { color: var(--navy-900); background: var(--gray-50); }

.header-cta { display: flex; align-items: center; gap: var(--s-4); }
.phone-pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--navy-900); font-weight: 600; font-size: .95rem;
}
.phone-pill::before {
  content: "☎"; color: var(--teal-700);
}

.mobile-toggle {
  display: none; background: transparent; border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: var(--s-2) var(--s-3);
  color: var(--navy-900);
}

@media (max-width: 1024px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: white; border-top: 1px solid var(--gray-100); flex-direction: column;
    padding: var(--s-4); gap: 0;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: var(--s-3) var(--s-4); border-radius: 0; border-bottom: 1px solid var(--gray-50); }
  .mobile-toggle { display: inline-flex; }
  .header-cta .phone-pill { display: none; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: .8rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--navy-900); color: white;
  box-shadow: 0 4px 14px rgba(11,37,69,.22);
}
.btn-primary:hover { background: var(--navy-800); color: white; box-shadow: 0 8px 20px rgba(11,37,69,.28); }
.btn-accent {
  background: var(--accent-gold); color: var(--navy-900);
}
.btn-accent:hover { background: #d8ba73; color: var(--navy-900); }
.btn-secondary {
  background: white; color: var(--navy-900); border-color: var(--gray-200);
}
.btn-secondary:hover { border-color: var(--navy-900); color: var(--navy-900); }
.btn-ghost {
  background: transparent; color: var(--navy-900);
}
.btn-ghost:hover { background: var(--gray-50); }
.btn-on-dark {
  background: white; color: var(--navy-900);
}
.btn-on-dark:hover { background: var(--accent-gold-soft); color: var(--navy-900); }
.btn-outline-on-dark {
  background: transparent; color: white; border-color: rgba(255,255,255,.35);
}
.btn-outline-on-dark:hover { background: rgba(255,255,255,.1); color: white; }
.btn-sm { padding: .55rem 1rem; font-size: .88rem; }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.trust-microcopy {
  margin-top: var(--s-3);
  font-size: .82rem;
  color: var(--gray-600);
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.trust-microcopy::before {
  content: "✓"; color: var(--success); font-weight: 700;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: var(--s-16) 0 var(--s-20);
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(19,80,91,.10), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(201,169,97,.12), transparent 60%),
    var(--warm-white);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: var(--s-12);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
  margin-bottom: var(--s-4);
}
.hero h1 em {
  font-style: normal;
  color: var(--teal-700);
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px; height: 6px;
  background: var(--accent-gold-soft); border-radius: 4px; z-index: -1;
}
.hero .lead { font-size: 1.2rem; max-width: 56ch; }
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin-top: var(--s-6);
}
.hero-trust {
  display: flex; flex-wrap: wrap; gap: var(--s-6);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--gray-100);
}
.hero-trust-item { font-size: .88rem; color: var(--gray-600); }
.hero-trust-item strong { display: block; color: var(--navy-900); font-size: 1.15rem; font-family: var(--font-serif); font-weight: 600; }

/* Hero visual: a "buying power" preview card */
.hero-card {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--s-6);
  position: relative;
}
.hero-card::before {
  content: "";
  position: absolute; inset: -8px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(201,169,97,.25), rgba(19,80,91,.15));
  z-index: -1; filter: blur(18px);
}
.hero-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-4);
}
.hero-card-header h3 { margin: 0; font-size: 1.1rem; }
.hero-card-header .tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal-700); background: var(--teal-50);
  padding: .3rem .6rem; border-radius: 999px;
}
.hero-card-row {
  display: grid; grid-template-columns: 1fr auto;
  padding: var(--s-3) 0; border-bottom: 1px dashed var(--gray-100);
  font-size: .95rem;
}
.hero-card-row:last-of-type { border-bottom: none; }
.hero-card-row .label { color: var(--gray-600); }
.hero-card-row .value { font-weight: 600; color: var(--navy-900); }
.hero-card-headline {
  margin-top: var(--s-4); padding: var(--s-4);
  background: linear-gradient(135deg, var(--navy-900), var(--teal-700));
  color: white; border-radius: var(--radius);
}
.hero-card-headline .small { font-size: .78rem; opacity: .85; letter-spacing: .08em; text-transform: uppercase; }
.hero-card-headline .big { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; line-height: 1.1; margin-top: 2px; }
.hero-card-note { margin-top: var(--s-3); font-size: .78rem; color: var(--gray-600); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: var(--s-10); }
}

/* =========================================================
   Journey selector
   ========================================================= */
.journey {
  padding: var(--s-16) 0;
}
.journey-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s-8); margin-bottom: var(--s-8); flex-wrap: wrap; }
.journey-head p { max-width: 46ch; margin-bottom: 0; }
.journey-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-4);
}
.journey-card {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
  text-decoration: none; color: var(--gray-800);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.journey-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--teal-700);
  text-decoration: none;
  color: var(--gray-800);
}
.journey-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--teal-50); color: var(--teal-700);
  display: grid; place-items: center; font-size: 1.3rem;
}
.journey-card h3 { font-size: 1.05rem; margin: 0; color: var(--navy-900); }
.journey-card p { font-size: .88rem; color: var(--gray-600); margin: 0; line-height: 1.45; }
.journey-card .arrow { color: var(--teal-700); font-weight: 600; font-size: .85rem; margin-top: auto; }
@media (max-width: 1024px) { .journey-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .journey-grid { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   Process — 5 steps
   ========================================================= */
.process {
  padding: var(--s-20) 0;
  background: var(--white);
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-10);
  counter-reset: step;
}
.process-step {
  position: relative;
  padding: var(--s-5);
  background: var(--warm-white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}
.process-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif);
  font-size: 2.4rem; color: var(--accent-gold);
  font-weight: 600; line-height: 1;
}
.process-step h4 { margin: var(--s-3) 0 var(--s-2); font-size: 1.05rem; }
.process-step p { font-size: .9rem; color: var(--gray-600); margin: 0; }
@media (max-width: 1024px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .process-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Local expertise (VA + MD)
   ========================================================= */
.local {
  background: var(--navy-900);
  color: var(--gray-100);
  padding: var(--s-20) 0;
  position: relative;
}
.local-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-12);
  align-items: start;
}
.local h2 { color: white; max-width: 18ch; }
.local p { color: rgba(255,255,255,.82); }
.state-cards {
  display: grid; gap: var(--s-4);
}
.state-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: var(--s-5);
}
.state-card h3 { color: white; margin-bottom: var(--s-2); display: flex; align-items: center; gap: var(--s-2); }
.state-card h3 .badge {
  background: var(--accent-gold); color: var(--navy-900);
  font-family: var(--font-sans); font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  padding: .2rem .55rem; border-radius: 4px; text-transform: uppercase;
}
.state-card ul { padding-left: 1.2rem; margin: 0 0 var(--s-3); color: rgba(255,255,255,.8); font-size: .95rem; }
.state-card ul li { margin-bottom: var(--s-1); }
.state-card a { color: var(--accent-gold); font-weight: 500; }
.state-card a:hover { color: white; }
@media (max-width: 900px) { .local-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Loan options overview
   ========================================================= */
.loans { padding: var(--s-20) 0; background: var(--warm-white); }
.loan-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4);
  margin-top: var(--s-8);
}
.loan-card {
  background: white; border: 1px solid var(--gray-100);
  border-radius: var(--radius); padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-2);
  transition: border-color .2s;
}
.loan-card:hover { border-color: var(--teal-700); }
.loan-card h3 { font-size: 1.1rem; margin: 0; }
.loan-card .loan-tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal-700);
}
.loan-card p { font-size: .9rem; color: var(--gray-600); margin: var(--s-2) 0; }
.loan-card .loan-best {
  font-size: .82rem; color: var(--navy-900); background: var(--accent-gold-soft);
  padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm);
  margin-top: auto;
}
.loan-card a { font-weight: 600; font-size: .9rem; margin-top: var(--s-3); }
@media (max-width: 1024px) { .loan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .loan-grid { grid-template-columns: 1fr; } }

/* =========================================================
   DPA teaser
   ========================================================= */
.dpa {
  padding: var(--s-16) 0;
  background: linear-gradient(135deg, var(--teal-50), var(--warm-white));
}
.dpa-card {
  background: white; border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: var(--s-10);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-10);
  align-items: center;
  box-shadow: var(--shadow);
}
.dpa-card .eyebrow { color: var(--accent-gold); }
.dpa-pills { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-4) 0 var(--s-5); }
.pill {
  background: var(--gray-50); color: var(--navy-900);
  padding: .35rem .75rem; border-radius: 999px;
  font-size: .82rem; font-weight: 500;
}
@media (max-width: 900px) { .dpa-card { grid-template-columns: 1fr; padding: var(--s-6); } }

/* =========================================================
   Tools strip
   ========================================================= */
.tools-strip { padding: var(--s-16) 0; }
.tool-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4);
  margin-top: var(--s-8);
}
.tool-card {
  padding: var(--s-5); background: white; border: 1px solid var(--gray-100);
  border-radius: var(--radius); text-decoration: none; color: var(--gray-800);
  display: flex; flex-direction: column; gap: var(--s-2);
  transition: border-color .2s, transform .2s;
}
.tool-card:hover { border-color: var(--teal-700); transform: translateY(-2px); text-decoration: none; color: var(--gray-800); }
.tool-card .tool-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--accent-gold-soft); color: var(--navy-900);
  display: grid; place-items: center; font-size: 1.1rem;
}
.tool-card h4 { margin: 0; font-size: 1rem; }
.tool-card p { font-size: .85rem; color: var(--gray-600); margin: 0; }
.tool-card .meta { font-size: .78rem; color: var(--teal-700); font-weight: 600; margin-top: auto; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tool-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Resources (educational cards)
   ========================================================= */
.resources { padding: var(--s-16) 0; background: var(--white); }
.resource-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5);
  margin-top: var(--s-8);
}
.resource-card {
  background: var(--warm-white);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: var(--gray-800);
  border: 1px solid var(--gray-100);
  transition: transform .2s, border-color .2s;
}
.resource-card:hover { transform: translateY(-3px); border-color: var(--teal-700); text-decoration: none; color: var(--gray-800); }
.resource-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--navy-900), var(--teal-700));
  display: grid; place-items: center; color: white; font-family: var(--font-serif);
  font-size: 2rem; letter-spacing: -.01em;
  padding: var(--s-4); text-align: center;
}
.resource-img.style-2 { background: linear-gradient(135deg, var(--teal-700), var(--accent-gold)); }
.resource-img.style-3 { background: linear-gradient(135deg, var(--navy-900), #2B4970); }
.resource-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); flex-grow: 1; }
.resource-body .tag { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-700); font-weight: 600; }
.resource-body h4 { margin: 0; font-size: 1.1rem; }
.resource-body p { font-size: .9rem; color: var(--gray-600); margin: 0; }
.resource-body .read { margin-top: auto; padding-top: var(--s-3); font-size: .85rem; color: var(--teal-700); font-weight: 600; }
@media (max-width: 900px) { .resource-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .resource-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Testimonials
   ========================================================= */
.testimonials { padding: var(--s-20) 0; background: var(--warm-white); }
.testimonial-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5);
  margin-top: var(--s-8);
}
.testimonial {
  background: white; border-radius: var(--radius); padding: var(--s-6);
  border: 1px solid var(--gray-100);
  display: flex; flex-direction: column; gap: var(--s-4);
}
.testimonial .stars { color: var(--accent-gold); letter-spacing: 2px; }
.testimonial blockquote {
  margin: 0; font-family: var(--font-serif); font-size: 1.05rem; color: var(--navy-900);
  line-height: 1.5;
}
.testimonial .who { display: flex; align-items: center; gap: var(--s-3); margin-top: auto; }
.testimonial .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-700), var(--navy-900));
  color: white; display: grid; place-items: center; font-weight: 600;
}
.testimonial .who-text { line-height: 1.25; }
.testimonial .who-text strong { display: block; color: var(--navy-900); font-size: .95rem; }
.testimonial .who-text span { font-size: .8rem; color: var(--gray-600); }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Final CTA
   ========================================================= */
.final-cta {
  padding: var(--s-20) 0;
  background:
    radial-gradient(700px 300px at 20% 20%, rgba(201,169,97,.18), transparent 70%),
    radial-gradient(700px 300px at 80% 90%, rgba(19,80,91,.35), transparent 70%),
    var(--navy-900);
  color: white;
}
.final-cta .container { text-align: center; }
.final-cta h2 { color: white; max-width: 20ch; margin: 0 auto var(--s-4); }
.final-cta p { color: rgba(255,255,255,.82); max-width: 56ch; margin: 0 auto var(--s-6); }
.final-cta-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-3); }
.final-cta .small {
  display: block; margin-top: var(--s-5); font-size: .82rem; color: rgba(255,255,255,.6);
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: #061a33;
  color: rgba(255,255,255,.75);
  padding: var(--s-16) 0 var(--s-6);
  font-size: .9rem;
}
.footer a { color: rgba(255,255,255,.8); }
.footer a:hover { color: white; text-decoration: none; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
  gap: var(--s-8);
  margin-bottom: var(--s-10);
}
.footer h4 { color: white; font-family: var(--font-sans); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--s-4); font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.footer .footer-brand p { font-size: .9rem; line-height: 1.5; }
.footer .footer-brand .logo-text strong { color: white; }
.footer .footer-brand .logo-text span { color: rgba(255,255,255,.7); }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--s-6);
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-4); align-items: center;
  font-size: .82rem; color: rgba(255,255,255,.55);
}
.footer-legal .eho-block {
  display: flex; gap: var(--s-4); align-items: center;
}
.footer-legal .eho-block .eho-mark {
  width: 36px; height: 36px; border: 2px solid rgba(255,255,255,.6); border-radius: 4px;
  display: grid; place-items: center; color: rgba(255,255,255,.8);
  font-size: 1.2rem; flex-shrink: 0;
}
.footer-legal p { margin: 0; max-width: 70ch; }
.footer-bottom { margin-top: var(--s-6); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; font-size: .8rem; color: rgba(255,255,255,.5); }
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-legal { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Page header (non-home)
   ========================================================= */
.page-hero {
  padding: var(--s-16) 0 var(--s-10);
  background:
    radial-gradient(800px 300px at 90% 0%, rgba(19,80,91,.08), transparent 70%),
    var(--warm-white);
  border-bottom: 1px solid var(--gray-100);
}
.page-hero .breadcrumb {
  font-size: .85rem; color: var(--gray-600); margin-bottom: var(--s-3);
}
.page-hero .breadcrumb a { color: var(--gray-600); }
.page-hero .breadcrumb a:hover { color: var(--navy-900); }
.page-hero h1 { margin-bottom: var(--s-3); max-width: 22ch; }
.page-hero p.lead { max-width: 60ch; }
.page-hero-ctas { margin-top: var(--s-6); display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* Content blocks */
.content-block { padding: var(--s-12) 0; }
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-10);
  align-items: start;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.info-card {
  background: white; border: 1px solid var(--gray-100);
  border-radius: var(--radius); padding: var(--s-6);
}
.info-card h3 { margin-top: 0; }
.info-card ul { padding-left: 1.2rem; }
.info-card ul li { margin-bottom: var(--s-2); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative; padding-left: 1.8rem; margin-bottom: var(--s-3);
}
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--teal-50); color: var(--teal-700);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem;
}

.callout {
  background: var(--teal-50);
  border-left: 4px solid var(--teal-700);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--radius);
  margin: var(--s-6) 0;
}
.callout h4 { margin-top: 0; color: var(--teal-700); }
.callout.accent { background: var(--accent-gold-soft); border-color: var(--accent-gold); }
.callout.accent h4 { color: var(--warning); }

.disclaimer-block {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: var(--s-5);
  font-size: .85rem;
  color: var(--gray-600);
}
.disclaimer-block strong { color: var(--navy-900); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-top: 1px solid var(--gray-100);
  padding: var(--s-5) 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--gray-100); }
.faq-item summary {
  cursor: pointer; font-weight: 600; color: var(--navy-900);
  font-size: 1.05rem; list-style: none; position: relative;
  padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%); font-size: 1.4rem; color: var(--teal-700);
  transition: transform .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item div { margin-top: var(--s-3); color: var(--gray-600); }

/* Forms */
.form-card {
  background: white; border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: var(--s-8);
  box-shadow: var(--shadow);
}
.form-row { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
.form-row-3 { display: grid; gap: var(--s-4); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-4); }
.field label {
  font-weight: 500; color: var(--navy-900); font-size: .92rem;
}
.field .help { font-size: .8rem; color: var(--gray-600); margin-top: -2px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
  padding: .75rem .9rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit;
  background: white;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(19,80,91,.15);
}
.privacy-note {
  margin-top: var(--s-4);
  font-size: .82rem; color: var(--gray-600);
  display: flex; gap: var(--s-2); align-items: flex-start;
}
.privacy-note::before {
  content: "🔒"; font-size: .95rem; flex-shrink: 0;
}

/* Tool-specific */
.tool-hero {
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(201,169,97,.15), transparent 70%),
    var(--navy-900);
  color: white;
  padding: var(--s-16) 0;
}
.tool-hero h1 { color: white; }
.tool-hero p { color: rgba(255,255,255,.85); max-width: 60ch; }
.tool-hero .pill-row { display: flex; gap: var(--s-2); margin-top: var(--s-4); flex-wrap: wrap; }
.tool-hero .pill-row .pill {
  background: rgba(255,255,255,.1); color: white;
  font-size: .8rem;
}

.tool-body { padding: var(--s-12) 0; background: var(--warm-white); }

.stepper {
  display: flex; gap: var(--s-2); margin-bottom: var(--s-8);
}
.stepper-dot {
  flex-grow: 1; height: 4px; border-radius: 2px;
  background: var(--gray-200);
  transition: background .3s;
}
.stepper-dot.active { background: var(--teal-700); }
.stepper-dot.done { background: var(--accent-gold); }

.step-panel { display: none; }
.step-panel.active { display: block; }

.option-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.option-btn {
  background: white; border: 2px solid var(--gray-100);
  border-radius: var(--radius); padding: var(--s-5);
  text-align: left; cursor: pointer;
  font-family: inherit; font-size: 1rem; color: var(--navy-900);
  transition: border-color .15s, background .15s;
  display: flex; flex-direction: column; gap: var(--s-2);
}
.option-btn:hover { border-color: var(--teal-700); background: var(--teal-50); }
.option-btn.selected { border-color: var(--teal-700); background: var(--teal-50); }
.option-btn strong { display: block; font-size: 1.05rem; }
.option-btn span { font-size: .88rem; color: var(--gray-600); }
@media (max-width: 600px) { .option-grid { grid-template-columns: 1fr; } }

.result-card {
  background: white; border-radius: var(--radius-lg);
  padding: var(--s-8); border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
}
.result-hero-number {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--navy-900); line-height: 1;
  margin: var(--s-4) 0;
}
.result-hero-number .small { font-size: 1.2rem; color: var(--gray-600); font-family: var(--font-sans); }

.result-breakdown {
  display: grid; gap: var(--s-2);
  margin: var(--s-6) 0;
  padding: var(--s-5);
  background: var(--warm-white);
  border-radius: var(--radius);
}
.result-breakdown .row {
  display: grid; grid-template-columns: 1fr auto;
  padding: var(--s-2) 0; border-bottom: 1px dashed var(--gray-100);
  font-size: .95rem;
}
.result-breakdown .row:last-child { border-bottom: none; font-weight: 600; color: var(--navy-900); padding-top: var(--s-3); }
.result-breakdown .label { color: var(--gray-600); }

.nav-button-row { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-6); }

/* Compliance inline text */
.compliance-inline {
  font-size: .82rem; color: var(--gray-600);
  margin-top: var(--s-4);
}

/* Chatbot bubble */
.chatbot-bubble {
  position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: 40;
  background: var(--navy-900); color: white;
  border: none; border-radius: 999px; padding: .85rem 1.3rem;
  font-weight: 600; font-size: .95rem;
  box-shadow: var(--shadow-lg);
  display: inline-flex; align-items: center; gap: var(--s-2);
  cursor: pointer;
}
.chatbot-bubble:hover { background: var(--navy-800); }
.chatbot-bubble::before { content: "💬"; }

/* Hidden utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================
   Mobile Sticky Bottom CTA (injected via js/main.js — E3)
   Shown only under 768px. Holds a primary CTA + dismiss X.
   ========================================================= */
.tmes-mobile-sticky {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--navy-900);
  color: white;
  z-index: 45;
  box-shadow: 0 -4px 20px rgba(11, 37, 69, 0.22);
  align-items: center;
  gap: var(--s-3);
  padding: 0 var(--s-4);
}
.tmes-mobile-sticky-btn {
  flex-grow: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-gold);
  color: var(--navy-900) !important;
  font-weight: 600;
  font-size: .98rem;
  padding: .75rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.tmes-mobile-sticky-btn:hover {
  background: #d8ba73;
  color: var(--navy-900);
  text-decoration: none;
}
.tmes-mobile-sticky-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .75);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: grid; place-items: center;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.tmes-mobile-sticky-close:hover {
  color: white;
  border-color: rgba(255, 255, 255, .45);
}
@media (max-width: 768px) {
  .tmes-mobile-sticky { display: flex; }
  body { padding-bottom: 72px; }
  .chatbot-bubble { bottom: 80px; }
}

/* =========================================================
   Tooltip direction override — opens downward when the
   tooltip anchor is near the top of the viewport (Phase 3 Fix 3)
   Uses attribute selector for specificity over the default
   upward-opening rule defined in css/mpb.css.
   ========================================================= */
.why-ask[data-tip-dir="down"]::after {
  bottom: auto;
  top: calc(100% + 8px);
}
.why-ask[data-tip-dir="down"]::before {
  bottom: auto;
  top: calc(100% + 4px);
}


/* ===================== Reverse Mortgage Center band ===================== */
.reverse-band {
  padding: var(--s-20) 0;
  background:
    radial-gradient(700px 300px at 15% 15%, rgba(201,169,97,.16), transparent 70%),
    radial-gradient(700px 300px at 85% 85%, rgba(19,80,91,.35), transparent 70%),
    var(--navy-900);
  color: white;
}
.reverse-band h2 { color: white; }
.reverse-band .reverse-checklist li { color: rgba(255,255,255,.9); }
.reverse-band .reverse-checklist li::before { color: var(--accent-gold); }
.reverse-band .info-card.reverse-info-card { background: white; color: #22303e; }
.reverse-band .info-card.reverse-info-card h3 { color: var(--navy-900); }
.reverse-band .info-card.reverse-info-card .checklist li { color: #22303e; }
.reverse-band .info-card.reverse-info-card p:last-child { color: #5b6b7d; }
@media (max-width: 900px) {
  .reverse-band .two-col { grid-template-columns: 1fr; }
}


/* ===================== Learning Center list ===================== */
.lc-list { list-style: none; padding: 0; margin: var(--s-5) 0 0; columns: 3; column-gap: var(--s-8); }
.lc-list li { break-inside: avoid; margin-bottom: var(--s-3); padding-left: 1.3rem; position: relative; line-height: 1.4; }
.lc-list li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent-gold); }
@media (max-width: 1000px) { .lc-list { columns: 2; } }
@media (max-width: 640px) { .lc-list { columns: 1; } }

/* ===================== About: Chris photo ===================== */
.chris-photo-card { max-width: 340px; }
.chris-photo-card img { width: 100%; border-radius: 12px; display: block; }
.chris-photo-card figcaption { font-size: .85rem; color: #5b6b7d; margin-top: var(--s-2); }
.chris-typed-sig { font-family: "Source Serif 4", Georgia, serif; font-style: italic; font-size: 1.5rem; color: var(--navy-900); border-top: 2px solid var(--accent-gold); display: inline-block; padding-top: var(--s-2); margin-top: var(--s-4); }
@media (max-width: 640px) { .chris-photo-card { max-width: 280px; margin: 0 auto; } }


/* ===================== Header wordmark next to badge ===================== */
.header .logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.header .logo-text strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2.2rem; font-weight: 600; color: var(--navy-900);
  letter-spacing: .005em; white-space: nowrap;
}
.header .logo-text > span {
  font-size: .95rem; color: #5b6b7d; letter-spacing: .22em;
  text-transform: uppercase; margin-top: 4px; white-space: nowrap;
}
@media (max-width: 1300px) {
  .header .logo-text strong { font-size: 1.8rem; }
  .header .logo-text > span { font-size: .82rem; letter-spacing: .16em; }
}
@media (max-width: 1120px) {
  .header .logo-text strong { font-size: 1.5rem; }
}
/* Desktop: two-row header — brand row on top, nav row underneath */
@media (min-width: 1025px) {
  .header .container { flex-wrap: wrap; row-gap: 0; }
  .header .nav {
    order: 3; flex-basis: 100%;
    justify-content: center;
    border-top: 1px solid var(--gray-100);
    margin-top: var(--s-3);
    padding-top: var(--s-2);
    padding-bottom: var(--s-1);
    gap: var(--s-2);
  }
}
@media (max-width: 760px) {
  .header .logo-text strong { font-size: 1.05rem; white-space: normal; max-width: 180px; }
  .header .logo-text > span { display: none; }
}
@media (max-width: 640px) {
  .header .logo-text { display: none; }
}
