@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Inter:wght@400;500;600&display=swap');

/* ── Foreclosure Decoded — Design System ─────────────────────────────────────
   Palette: Navy #1e2b4a · Teal #1f7a72 · Amber/mustard gold #b8860b
   Typography: Poppins headings · Inter body
   ─────────────────────────────────────────────────────────────────────────── */

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

:root {
  --navy:        #1e2b4a;
  --navy-dark:   #111c30;
  --navy-light:  #4a6a8a;
  --teal:        #1f7a72;
  --teal-light:  #2a9e94;
  --amber:       #b8860b;
  --red:         #b3402f;
  --success:     #2e7d4f;
  --bg:          #ffffff;
  --surface:     #ffffff;
  --surface-alt: #f5f7fa;
  --border:      #d4d7dc;
  --border-light:#e8eaee;
  --text:        #1c1c1a;
  --text-muted:  #6b6a63;
  --text-light:  #9b9a93;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 1px 2px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 4px 16px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.25;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
h1 { font-size: 2.125rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout Helpers ──────────────────────────────────────────────────────── */
.container    { max-width: 1300px; margin: 0 auto; padding: 0 32px; }
.container-sm { max-width: 640px;  margin: 0 auto; padding: 0 24px; }
.section    { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
#fd-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  height: 54px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-brand img {
  height: 28px;
  width: auto;
  flex-shrink: 0;
}

.nav-brand-name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav-link.active { color: #fff; font-weight: 600; position: relative; }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 4px; left: 11px; right: 11px;
  height: 2px; background: var(--amber); border-radius: 1px;
}
.nav-divider { width: 1px; height: 18px; background: rgba(255,255,255,.2); margin: 0 4px; }

.nav-btn {
  padding: 6px 14px;
  background: #ffffff;
  color: var(--navy) !important;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s;
}
.nav-btn:hover { opacity: .9; text-decoration: none; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,.8); border-radius: 2px;
  transition: .2s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 10px 20px 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  gap: 2px;
  background: var(--navy);
}
.nav-mobile .nav-link { padding: 10px 11px; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile.open { display: flex; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, background .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { opacity: .85; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { opacity: .88; color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { opacity: .88; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: .88; }
.btn-lg { padding: 12px 24px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-sm { padding: 16px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group   { margin-bottom: 18px; }
.form-label   { display: block; margin-bottom: 5px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14.5px;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(54,59,98,.1);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint  { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.form-error { margin-top: 6px; font-size: 13px; color: var(--red); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  line-height: 1.55;
}
.alert-error   { background: rgba(179,64,47,.07);  color: var(--red);   border-color: rgba(179,64,47,.25); }
.alert-success { background: rgba(31,122,114,.08); color: #12645d;      border-color: rgba(31,122,114,.28); }
.alert-info    { background: rgba(54,59,98,.07);   color: var(--navy);  border-color: rgba(54,59,98,.22); }
.alert-warn    { background: rgba(184,134,11,.09); color: #7a6008;      border-color: rgba(184,134,11,.3); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-navy    { background: var(--navy); color: #fff; }
.badge-teal    { background: var(--teal); color: #fff; }
.badge-amber   { background: var(--amber); color: #fff; }
.badge-muted   { background: var(--border); color: var(--text-muted); }
.badge-premium { background: linear-gradient(135deg, var(--navy), var(--teal)); color: #fff; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-bottom: 40px;
}
.page-header h1 { color: var(--text); margin-bottom: .25em; }
.page-header .subtitle { color: var(--text-muted); font-size: 1rem; margin-top: 6px; margin-bottom: 0; }

/* Accent stripe above header sections */
.page-header-accent {
  border-top: 3px solid var(--navy);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  background: #fafafa;
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 80px;
}
.footer-grid {
  max-width: 1300px; margin: 0 auto 36px; padding: 0 32px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
}
.footer-logo { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.footer-logo img { opacity: .5; filter: invert(1) brightness(.3); }
.footer-logo-name {
  font-family: 'Poppins', system-ui, sans-serif; font-size: 13px;
  font-weight: 700; color: var(--text);
}
.footer-tagline { font-size: 12px; color: var(--text-light); line-height: 1.65; max-width: 260px; margin: 0; }
.footer-col-label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text); margin-bottom: 10px;
}
.footer-col-links { display: flex; flex-direction: column; gap: 7px; }
.footer-col-links a { font-size: 0.78rem; color: var(--text-muted); text-decoration: none; transition: color .15s; }
.footer-col-links a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1300px; margin: 0 auto; padding: 24px 32px 0;
  border-top: 1px solid #ebebeb;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: #bbb;
}
.footer-disclaimer { max-width: 620px; line-height: 1.6; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; padding: 0 20px; } .footer-bottom { padding: 24px 20px 0; } }

/* ── Loading spinner ─────────────────────────────────────────────────────── */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status chips (pipeline) ─────────────────────────────────────────────── */
.status-not_started { color: var(--text-light); }
.status-in_progress { color: var(--amber); }
.status-complete    { color: var(--teal); }
.status-skipped     { color: var(--text-light); text-decoration: line-through; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-navy    { color: var(--navy); }
.text-teal    { color: var(--teal); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden  { display: none !important; }
.w-full  { width: 100%; }

/* ── Section dividers ────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}
.empty-state h3 { color: var(--text-muted); font-size: 1rem; margin-bottom: .5rem; }
