/* =========================================================
   NCDA, Inc. — National Center for Debt Advocacy
   Design system: "The Ledger" — calm, paper-and-ink relief
   ========================================================= */

:root {
  /* Color tokens */
  --paper: #FAF8F4;
  --paper-dim: #EFEAE0;
  --ink: #1F2B3D;
  --ink-soft: #4A5568;
  --ledger-gold: #B8902F;
  --ledger-gold-dim: #E6D7AC;
  --relief-teal: #3F6B66;
  --relief-teal-dark: #2C4D49;
  --rust: #A85339;
  --line: #DCD5C5;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --max-width: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--relief-teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ledger-gold);
  display: inline-block;
  margin-bottom: 0.9em;
}

.hairline {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 3px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--relief-teal);
  color: var(--white);
}
.btn-primary:hover { background: var(--relief-teal-dark); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-ghost-light {
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn-ghost-light:hover { background: var(--white); color: var(--relief-teal-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.logo img { height: 40px; width: auto; }
.logo-text-main {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.logo-text-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
}

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--relief-teal-dark); text-decoration: none; }
.header-cta { display: flex; align-items: center; gap: 18px; }
.header-phone {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

@media (max-width: 880px) {
  .main-nav ul { display: none; }
  .header-phone { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 73px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    gap: 16px;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}
.hero h1 { margin-bottom: 0.45em; }
.hero .lede { font-size: 1.18rem; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* ---------- Ledger card (signature element) ---------- */
.ledger-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 24px 50px -28px rgba(31,43,61,0.35);
  overflow: hidden;
}
.ledger-card-head {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ledger-card-head span.dot { color: var(--ledger-gold); }
.ledger-rows { padding: 6px 22px 4px; }
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row .label { font-family: var(--font-body); color: var(--ink-soft); font-size: 0.92rem; }
.ledger-row .amount { font-weight: 600; }
.ledger-row.before .amount { color: var(--rust); text-decoration: line-through; text-decoration-color: var(--rust); }
.ledger-row.after .amount { color: var(--relief-teal-dark); }
.ledger-total {
  background: var(--paper-dim);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 2px solid var(--ledger-gold);
}
.ledger-total .label { font-weight: 600; }
.ledger-total .amount {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--relief-teal-dark);
}
.ledger-total .amount small {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--ink-soft);
  display: block;
  margin-top: 2px;
}

/* ---------- Stat band ---------- */
.stat-band {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 0;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
@media (max-width: 700px) { .stat-grid { grid-template-columns: 1fr; gap: 28px; } }
.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--ledger-gold);
}
.stat-label {
  font-size: 0.88rem;
  color: var(--paper-dim);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 56px 0; }
.section-dim { background: var(--paper-dim); }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 880px) { .three-col { grid-template-columns: 1fr; } }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }

.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 30px 26px;
}
.feature-card .num {
  font-family: var(--font-mono);
  color: var(--ledger-gold);
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: block;
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
.step-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--ledger-gold);
  font-weight: 700;
}

/* ---------- Testimonials ---------- */
.quote-card {
  background: var(--white);
  border-left: 3px solid var(--ledger-gold);
  border-radius: 4px;
  padding: 26px 28px;
  box-shadow: 0 12px 28px -20px rgba(31,43,61,0.25);
}
.quote-card p.q { font-style: italic; color: var(--ink); font-size: 1.02rem; }
.quote-card .who { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--relief-teal-dark);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--ledger-gold-dim); max-width: 540px; margin: 0 auto 28px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .icon { font-family: var(--font-mono); color: var(--ledger-gold); flex-shrink: 0; }
.faq-a {
  display: none;
  padding: 0 0 22px;
  color: var(--ink-soft);
  max-width: 700px;
}
.faq-item.open .faq-a { display: block; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
}
label { display: block; font-size: 0.88rem; font-weight: 600; margin: 16px 0 6px; }
label:first-child { margin-top: 0; }
input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--relief-teal);
  outline-offset: 1px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.consent { font-size: 0.78rem; color: var(--ink-soft); margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper-dim);
  padding: 56px 0 28px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ledger-gold);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--paper-dim); }
.footer-grid a:hover { color: var(--white); }
.footer-legal {
  padding-top: 28px;
  font-size: 0.76rem;
  line-height: 1.7;
  color: #9AA5B1;
}
.footer-legal p { color: #9AA5B1; margin-bottom: 12px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  font-size: 0.8rem;
  color: #7E8A98;
}

/* ---------- Page header (interior pages) ---------- */
.page-header {
  background: var(--paper-dim);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 { margin-bottom: 10px; }
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--ink-soft); }

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li {
  padding: 8px 0 8px 30px;
  position: relative;
  color: var(--ink-soft);
}
.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--relief-teal-dark);
  font-weight: 700;
}

.state-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.state-table th, .state-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.state-table th {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- Logo image ---------- */
.logo img {
  height: 52px;
  width: auto;
  display: block;
}
