/* Palette built on the BACF wordmark blue, #007CC3, sampled from the
   company's existing logo. --bay is that blue; the deeper shades are it
   darkened, so the whole site stays on-brand. */
:root {
  --bg: #f6f8fa;
  --panel: #ffffff;
  --ink: #14232e;
  --muted: #5b6b78;
  --line: #dfe5ea;

  --bay: #007cc3;
  --bay-mid: #00639c;
  --bay-deep: #024a75;
  --bay-darkest: #033a5c;
  --bay-soft: #e8f4fb;

  --gold: #e9a63b;
  --gold-soft: #fdf2df;
  --span: #c0492c;
  --danger: #a3352b;
  --good: #2f6f4e;

  --shadow-sm: 0 1px 2px rgba(3, 58, 92, 0.07), 0 2px 8px rgba(3, 58, 92, 0.06);
  --shadow-md: 0 4px 12px rgba(3, 58, 92, 0.10), 0 12px 28px rgba(3, 58, 92, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.65 "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 480px at 6% -10%, rgba(27, 73, 101, 0.08), transparent 62%),
    radial-gradient(900px 420px at 98% 2%, rgba(217, 164, 65, 0.13), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--bay); text-underline-offset: 2px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -999px; top: 0; z-index: 60;
  background: var(--bay); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* Loud enough that nobody edits staging thinking it is live. */
.envbar {
  background: var(--span); color: #fff; text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: .1em; padding: 5px;
}

/* ---------- logo ----------
   The company's own artwork. Sized by height so the intrinsic 302x136 ratio
   is preserved; width:auto stops the width/height attributes (which are there
   to reserve layout space and avoid a reflow) from squashing it. */

.logo {
  display: block;
  height: 52px; width: auto;
  transition: opacity 0.18s ease;
}
a:hover .logo { opacity: 0.82; }

/* The reversed artwork is already white; it just needs a little more room. */
.logo.on-dark { height: 58px; }

@media (max-width: 720px) {
  .logo { height: 42px; }
}

/* ---------- header ---------- */

header.site {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
header.site .inner {
  max-width: 1060px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 20px;
}
header.site .brand { text-decoration: none; color: var(--ink); }
header.site nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
header.site nav a {
  text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted);
  white-space: nowrap;
}
header.site nav a:hover { color: var(--bay); }
header.site nav a[aria-current='page'] { color: var(--bay); }
header.site nav a.btn { color: #fff; }
header.site nav a.btn:hover { color: #fff; }

.navtoggle {
  display: none; margin-left: auto; background: none; border: 0; padding: 10px;
  box-shadow: none; cursor: pointer;
}
.navtoggle .bars,
.navtoggle .bars::before,
.navtoggle .bars::after {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease;
}
.navtoggle .bars { position: relative; }
.navtoggle .bars::before, .navtoggle .bars::after { content: ''; position: absolute; }
.navtoggle .bars::before { top: -7px; }
.navtoggle .bars::after { top: 7px; }
.navtoggle[aria-expanded='true'] .bars { background: transparent; }
.navtoggle[aria-expanded='true'] .bars::before { transform: translateY(7px) rotate(45deg); }
.navtoggle[aria-expanded='true'] .bars::after { transform: translateY(-7px) rotate(-45deg); }

main { padding: 40px 0 0; }

h1 { font-size: 38px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.025em; }
h2 { font-size: 25px; margin: 44px 0 16px; letter-spacing: -0.015em; }
h3 { letter-spacing: -0.01em; }
p.lead { color: var(--muted); margin-top: 0; font-size: 17px; }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin-bottom: 8px; }

ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { position: relative; padding-left: 27px; margin-bottom: 9px; }
ul.ticks li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 8px; height: 14px; border: solid var(--gold);
  border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* ---------- panels ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.hero {
  background: linear-gradient(155deg, var(--bay) 0%, var(--bay-deep) 100%);
  color: #fff; border: 0; position: relative; overflow: hidden;
  padding: 56px 40px 64px;
}
.hero h1 { font-size: 44px; max-width: 17ch; }
.hero p.lead { color: rgba(255, 255, 255, 0.87); font-size: 18px; max-width: 56ch; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800;
  color: var(--gold); margin: 0 0 14px;
}
/* A soft light source from the top right, rather than a decorative skyline.
   The illustrated version read as folksy against the corporate blue. */
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(760px 420px at 88% 6%, rgba(255, 255, 255, 0.14), transparent 66%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin: 26px 0 0; }

.trustbar {
  display: flex; gap: 30px; flex-wrap: wrap; margin: 30px 0 0;
  padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.trustbar div { min-width: 120px; }
.trustbar .big { display: block; font-size: 27px; font-weight: 800; color: var(--gold); letter-spacing: -0.02em; }
.trustbar span:not(.big) { font-size: 14px; color: rgba(255, 255, 255, 0.78); }

.grid { display: grid; gap: 20px; }
.grid.two   { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.split { grid-template-columns: 1.15fr 0.85fr; align-items: start; gap: 32px; }

@media (max-width: 900px) {
  .grid.three { grid-template-columns: repeat(2, 1fr); }
  .grid.split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  header.site nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px; box-shadow: var(--shadow-md);
  }
  header.site nav.open { display: flex; }
  header.site nav a { padding: 12px 0; font-size: 16px; }
  header.site nav a.btn { margin-top: 10px; text-align: center; }
  .navtoggle { display: block; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .hero { padding: 38px 24px 46px; }
  .hero h1 { font-size: 31px; }
  h1 { font-size: 29px; }
  h2 { font-size: 22px; margin-top: 34px; }
}

/* numbered process cards */
.step { position: relative; padding-top: 32px; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.step .step-num {
  position: absolute; top: -16px; left: 26px;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: var(--bay-deep);
  background: var(--gold); box-shadow: var(--shadow-sm);
}
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* loan program cards */
.prog {
  display: block; text-decoration: none; color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.prog:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.prog h3 { margin: 0 0 7px; font-size: 19px; color: var(--bay-deep); }
.prog p { margin: 0; color: var(--muted); font-size: 15px; }
.prog .ico {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 15px;
  border-radius: 11px; color: var(--bay); background: var(--bay-soft);
  transition: background 0.18s ease, color 0.18s ease;
}
.prog:hover .ico { background: var(--bay); color: #fff; }
.prog .more { display: inline-block; margin-top: 13px; font-size: 14px; font-weight: 700; color: var(--bay); }

/* "Why a brokerage" cards */
.cap h3 { margin: 0 0 8px; font-size: 17px; color: var(--bay-deep); line-height: 1.35; }
.cap p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- testimonials ---------- */

.quote {
  position: relative; margin: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
/* Opening quotation mark, set behind the text. */
.quote::before {
  content: '\201C';
  position: absolute; top: 6px; left: 18px;
  font-size: 62px; line-height: 1; font-weight: 700;
  color: var(--bay-soft); pointer-events: none;
}
.quote blockquote {
  position: relative; margin: 0 0 20px; font-size: 15.5px; line-height: 1.65; color: var(--ink);
}
.quote figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.quote .who { font-weight: 700; font-size: 15px; }
.quote .where { font-size: 13.5px; color: var(--muted); }
.quote .src {
  margin-top: 8px; align-self: flex-start; text-decoration: none;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--bay); background: var(--bay-soft); border-radius: 99px; padding: 3px 10px;
  transition: background 0.15s ease, color 0.15s ease;
}
a.src:hover { background: var(--bay); color: #fff; }

.review-links { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.review-links a { font-weight: 700; }

/* Placeholder entries — deliberately conspicuous, and never shown live. */
.quote.is-example { border-style: dashed; border-color: var(--gold); background: #fffdf8; }
.quote.is-example blockquote { color: var(--muted); font-style: italic; }
.example-flag {
  position: absolute; top: -10px; right: 16px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #8a6113; background: var(--gold); border-radius: 99px; padding: 3px 11px;
}

/* Leadership bio */
.bio { display: flex; gap: 22px; align-items: flex-start; }
.bio img {
  width: 112px; height: 112px; flex: none; border-radius: 50%;
  object-fit: cover; box-shadow: var(--shadow-sm);
}
.bio h3 { margin: 0 0 2px; font-size: 19px; }
.bio .role { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--bay); }
.bio p { font-size: 15px; }
@media (max-width: 560px) { .bio { flex-direction: column; gap: 16px; } }

/* County chips */
.chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 9px; }
.chips li {
  font-size: 14px; font-weight: 600; color: var(--bay-deep);
  background: var(--bay-soft); border-radius: 99px; padding: 7px 15px;
}

/* Program-specific disclosure — currently only the reverse mortgage, whose
   advertising carries obligations the other programs do not. */
.program-disclosure {
  margin: 22px 0 0;
  padding: 14px 16px;
  background: #faf9f6;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* anchored detail sections on loans.php */
.prog-detail { scroll-margin-top: 96px; }
.prog-detail h2 { margin-top: 0; color: var(--bay); }

/* ---------- forms ---------- */

label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--bay);
  box-shadow: 0 0 0 3px rgba(27, 73, 101, 0.16);
}
.field { margin-bottom: 17px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.req { color: var(--span); }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -5000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

button, .btn {
  display: inline-block; padding: 12px 22px; font: inherit; font-weight: 700; font-size: 15px;
  border: 0; border-radius: 10px; cursor: pointer; text-decoration: none; text-align: center;
  background: linear-gradient(160deg, var(--bay) 0%, var(--bay-deep) 100%);
  color: #fff; box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); filter: brightness(1.08); }
button:active, .btn:active { transform: translateY(0); }
button:disabled { opacity: 0.6; cursor: progress; transform: none; }
.btn.gold { background: linear-gradient(160deg, var(--gold) 0%, #c08c28 100%); color: var(--bay-deep); }
.btn.ghost { background: #fff; color: var(--bay); border: 1.5px solid var(--line); }
.btn.ghost-light { background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.4); }
.btn.small { padding: 8px 14px; font-size: 14px; }
button.link {
  background: none; color: var(--danger); padding: 0; font-weight: 600; box-shadow: none;
  font-size: 14px; text-decoration: underline;
}
button.link:hover { transform: none; box-shadow: none; filter: none; }
button.link.plain { color: var(--bay); }

.error {
  background: #fdecea; border: 1.5px solid #f3c5be; color: var(--danger);
  padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 15px; font-weight: 500;
}
.notice {
  background: #e9f2ec; border: 1px solid #c3ddcb; color: var(--good);
  padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-size: 15px;
}

/* ---------- CTA band ---------- */

.cta {
  margin: 56px 0 0;
  background: linear-gradient(150deg, var(--bay) 0%, var(--bay-deep) 100%);
  color: #fff; border-radius: var(--radius); padding: 42px 36px;
  box-shadow: var(--shadow-md); text-align: center;
}
.cta h2 { margin: 0 0 10px; font-size: 27px; }
.cta p { color: rgba(255,255,255,0.86); max-width: 56ch; margin: 0 auto; }
.cta-actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; margin-top: 24px !important; }

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }

.badge {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px;
  border-radius: 99px; background: var(--gold-soft); color: #8a6113;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.badge.new       { background: var(--bay-soft); color: var(--bay); }
.badge.contacted { background: var(--gold-soft); color: #8a6113; }
.badge.working   { background: #ede7f6; color: #5b3f92; }
.badge.closed    { background: #e9f2ec; color: var(--good); }
.badge.spam      { background: #f1efec; color: var(--muted); }

.empty { color: var(--muted); padding: 28px 0; }

/* ---------- inquiry inbox ---------- */

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a {
  text-decoration: none; font-size: 14px; font-weight: 700; padding: 8px 15px;
  border-radius: 99px; border: 1.5px solid var(--line); color: var(--muted); background: #fff;
}
.tabs a.on { background: var(--bay); border-color: var(--bay); color: #fff; }

.lead-card { margin-bottom: 18px; }
.lead-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.lead-head h3 { margin: 0; font-size: 18px; }
.lead-meta { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.lead-msg {
  background: #faf9f6; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin: 14px 0 0; white-space: pre-wrap; font-size: 15px;
}
.lead-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.lead-actions form { display: inline; }

/* ---------- footer ---------- */

footer.site {
  margin-top: 72px; background: var(--bay-deep); color: rgba(255,255,255,0.82);
  padding: 48px 0 28px;
}
footer.site .inner { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
footer.site a { color: #fff; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--gold); margin: 0 0 14px;
}
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 34px; }
.foot-note { font-size: 14px; margin: 16px 0 0; max-width: 34ch; color: rgba(255,255,255,0.7); }
footer.site ul.plain li { font-size: 14.5px; }

@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; gap: 26px; } }

.disclosure {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,0.6);
}
.disclosure p { margin: 0 0 10px; }
.disclosure strong { color: rgba(255,255,255,0.85); }
.copyline { margin-top: 16px !important; }
