/* ============================================================
   Illinois Assist Program — Site Stylesheet
   Colors matched from illinoisassistprogram.com screenshot
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600&display=swap');

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

:root {
  --teal:        #2a7d9c;
  --teal-dark:   #1f5f78;
  --rust:        #b84a28;
  --rust-light:  #c85c38;
  --slate:       #2c3a42;
  --slate-mid:   #4a5c66;
  --gray-text:   #6b7b84;
  --bg-white:    #ffffff;
  --bg-light:    #f3f4f4;
  --bg-warm:     #faf9f7;
  --border:      #dde3e6;
  --font-serif:  'Libre Baskerville', Georgia, serif;
  --font-sans:   'Source Sans 3', sans-serif;
  --max-width:   1140px;
  --radius:      4px;
  --focus-color: #2a7d9c;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--slate);
  background: var(--bg-white);
  line-height: 1.65;
  font-size: 16px;
}

/* ── ADA: SKIP NAVIGATION ── */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--teal);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
  transition: top 0.1s;
}
.skip-nav:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ── ADA: FOCUS STYLES ── */
/* Visible focus ring for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* Remove default outline only when focus-visible is supported */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ── ADA: REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── ADA: SCREEN READER ONLY ── */
.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;
}

/* ── UTILITY ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 5rem 0; }
.section-light { background: var(--bg-light); }
.section-warm  { background: var(--bg-warm); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 1.8rem;
  height: 2px;
  background: var(--rust);
  flex-shrink: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--slate);
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

p { color: var(--slate-mid); max-width: 60ch; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--rust);
  color: #fff;
}
.btn-primary:hover { background: var(--rust-light); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--teal);
  font-weight: 500;
}
.btn-ghost:hover { color: var(--teal-dark); }
.btn-ghost::after { content: ' →'; }

/* ── NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  height: 70px;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

.nav-brand-name {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--slate-mid);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal-dark);
  background: var(--bg-light);
}

.nav-links a.active { font-weight: 600; }

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rust) !important;
  background: transparent !important;
}
.nav-cta:hover { color: var(--rust-light) !important; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate);
  transition: all 0.2s;
}

/* ── HERO ── */
.hero {
  padding: 5rem 0 4.5rem;
  background: var(--bg-white);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}

.hero-content { max-width: 580px; }

.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em {
  font-style: italic;
  color: var(--rust);
  font-family: var(--font-serif);
}

.hero-desc {
  font-size: 1rem;
  color: var(--slate-mid);
  margin-bottom: 2rem;
  max-width: 48ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Stats column */
.hero-stats {
  padding-top: 0.5rem;
}

.stat-item {
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
}
.stat-item:first-child { border-top: none; padding-top: 0; }

.stat-rule {
  width: 1.5rem;
  height: 2px;
  background: var(--rust);
  margin-bottom: 0.6rem;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--slate);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--slate-mid);
  line-height: 1.3;
}

/* ── TRUST BAR ── */
.trust-bar {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--slate-mid);
  font-weight: 400;
}

.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rust);
  flex-shrink: 0;
}

/* ── PROCESS STEPS ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.step-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rust);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  display: block;
}

.step-rule {
  width: 1.5rem;
  height: 2px;
  background: var(--rust);
  margin-bottom: 0.75rem;
}

.step h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.step p  { font-size: 0.9rem; max-width: none; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-white);
}

.page-header h1 { margin-bottom: 0.75rem; }
.page-header p  { font-size: 1rem; }

/* ── CONTENT SECTIONS ── */
.content-block { margin-bottom: 3rem; }
.content-block h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.content-block p  { margin-bottom: 0.75rem; }

/* ── COMPARISON TABLE ── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
}

.comparison-table th {
  background: var(--teal);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-size: 0.85rem;
}

.comparison-table th:first-child { border-radius: var(--radius) 0 0 0; }
.comparison-table th:last-child  { border-radius: 0 var(--radius) 0 0; }

.comparison-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--slate-mid);
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--bg-light); }

.highlight-cell {
  color: var(--teal);
  font-weight: 600;
}

/* ── LENDER CARDS ── */
.lenders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.lender-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg-white);
  transition: box-shadow 0.2s;
}

.lender-card:hover { box-shadow: 0 4px 16px rgba(42,125,156,0.1); }

.lender-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--rust);
  display: inline-block;
}

.lender-contact { margin-bottom: 0.5rem; }

.contact-person {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 0.25rem;
}

.contact-detail {
  font-size: 0.85rem;
  color: var(--slate-mid);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.contact-detail a { color: var(--teal); }
.contact-detail a:hover { text-decoration: underline; }

.lender-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.lender-website {
  font-size: 0.82rem;
  color: var(--teal);
  font-weight: 500;
}
.lender-website:hover { text-decoration: underline; }

/* ── COMMUNITIES GRID ── */
.communities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.community-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  transition: border-color 0.15s, background 0.15s;
}

.community-item:hover {
  border-left-color: var(--rust);
  background: var(--bg-warm);
}

/* ── LIMITS TABLE ── */
.limits-note {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rust);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--slate-mid);
  margin-bottom: 2rem;
}

.limits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.limits-table th {
  background: var(--slate);
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.limits-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--slate-mid);
}

.limits-table tr:nth-child(even) td { background: var(--bg-light); }
.limits-table tr:last-child td { border-bottom: none; }
.limits-table td:first-child { font-weight: 500; color: var(--slate); }

/* ── CONTACT FORM ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info p  { margin-bottom: 1.5rem; }

.contact-detail-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.contact-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.2rem;
}

.contact-detail-value {
  font-size: 0.95rem;
  color: var(--slate);
}

.contact-detail-value a { color: var(--teal); }
.contact-detail-value a:hover { text-decoration: underline; }

.contact-form-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--slate);
  background: var(--bg-white);
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,125,156,0.1);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.form-submit { width: 100%; justify-content: center; padding: 0.85rem; }

/* ── FOOTER ── */
.site-footer {
  background: var(--slate);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
}

.footer-meta {
  font-size: 0.8rem;
  line-height: 1.7;
  text-align: right;
}

.footer-meta a { color: rgba(255,255,255,0.75); }
.footer-meta a:hover { color: #fff; }

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
  margin-top: 0.25rem;
}

/* ── INCOME LIMITS MOBILE CARDS ── */
.income-cards-mobile { display: none; }

.income-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.income-card-municipalities {
  background: var(--slate);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  line-height: 1.5;
}

.income-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
}

.income-card-area {
  background: var(--teal);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 0.25rem;
  letter-spacing: 0.02em;
}

.income-card-label {
  font-size: 0.75rem;
  color: var(--slate-mid);
  padding: 0.5rem 1rem 0.1rem;
  background: var(--bg-light);
}

.income-card-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate);
  padding: 0.1rem 1rem 0.6rem;
  background: var(--bg-light);
  border-left: 1px solid var(--border);
}

/* Show cards, hide table on mobile */
@media (max-width: 640px) {
  .income-table-desktop { display: none; }
  .income-cards-mobile  { display: block; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-inner        { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-stats        { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; padding-top: 0; border-top: 1px solid var(--border); }
  .stat-item         { border-top: none; padding-top: 0; }
  .steps-grid        { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid      { grid-template-columns: 1fr; gap: 2rem; }
  .footer-meta       { text-align: left; }
}

@media (max-width: 700px) {
  .nav-links         { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 1rem; gap: 0; }
  .nav-links.open    { display: flex; }
  .nav-toggle        { display: flex; }
  .hero-stats        { grid-template-columns: 1fr 1fr; }
  .section           { padding: 3rem 0; }
  .lenders-grid      { grid-template-columns: 1fr; }
  .communities-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero-stats        { grid-template-columns: 1fr; }
  .communities-grid  { grid-template-columns: 1fr; }
  .trust-bar-inner   { gap: 1rem; }
}
