/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --surface: #1a1d2e;
  --surface2: #252840;
  --border: #2e3158;
  --text: #e2e8f0;
  --muted: #8892a4;
  --accent: #6c8bef;
  --accent-dark: #4f6dd4;
  --green: #34d399;
  --red: #f87171;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(15,17,23,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0.9rem 1.5rem;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: var(--text);
}

.logo-icon { font-size: 1.4rem; }

nav { display: flex; align-items: center; gap: 1.5rem; }
nav a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
nav a:hover { color: var(--text); text-decoration: none; }

.btn-nav {
  background: var(--accent);
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f1117 0%, #1a1d40 50%, #0f1117 100%);
  padding: 5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 720px; margin: 0 auto; }

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.8rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; align-items: center; }
.stat strong { font-size: 1.8rem; color: var(--accent); }
.stat span { font-size: 0.8rem; color: var(--muted); }

/* ── Sections ──────────────────────────────────────────────────────────────── */
.section { padding: 4rem 1.5rem; }
.alt-bg { background: var(--surface); }

.container { max-width: 1000px; margin: 0 auto; }

h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* ── Assessment ────────────────────────────────────────────────────────────── */
.assessment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.progress-bar {
  background: var(--border);
  border-radius: 999px;
  height: 6px;
  margin-bottom: 0.5rem;
}

.progress-fill {
  background: var(--accent);
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 12.5%;
}

.progress-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.8rem;
}

.step { display: none; }
.step.active { display: block; animation: fadein 0.3s ease; }

@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step h3 { font-size: 1.15rem; margin-bottom: 1.2rem; font-weight: 700; }
.step-hint { font-size: 0.85rem; color: var(--muted); margin-top: -0.8rem; margin-bottom: 1rem; }

.options { display: flex; flex-direction: column; gap: 0.6rem; }

.option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.95rem;
}

.option:hover { border-color: var(--accent); background: rgba(108,139,239,0.08); }
.option input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  cursor: pointer;
  font-size: 0.9rem;
}
.checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }

.text-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.7rem 1rem;
  font-size: 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.text-input:focus { border-color: var(--accent); }
.text-input.small { width: 100px; }

.field-label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }

.sub-question { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.sub-question p { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.6rem; }

.not-resident-msg {
  margin-top: 1rem;
  background: rgba(248,113,113,0.1);
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
}

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.btn-next, .btn-back, .btn-submit {
  padding: 0.65rem 1.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}

.btn-next, .btn-submit {
  background: var(--accent);
  color: #fff;
}
.btn-next:hover, .btn-submit:hover { background: var(--accent-dark); transform: translateX(2px); }

.btn-back {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-back:hover { color: var(--text); border-color: var(--text); }

/* ── Results ───────────────────────────────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

.badge-federal   { background: rgba(108,139,239,0.15); color: #6c8bef; }
.badge-state     { background: rgba(52,211,153,0.15);  color: #34d399; }
.badge-nonprofit { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.badge-private   { background: rgba(167,139,250,0.15); color: #a78bfa; }
.badge-federal_state { background: rgba(99,179,237,0.15); color: #63b3ed; }
.badge-state_nonprofit { background: rgba(245,158,11,0.15); color: #f59e0b; }

.result-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.result-card .amount { font-size: 0.85rem; color: var(--green); font-weight: 600; margin-bottom: 0.5rem; }
.result-card p { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.5; }
.result-card a.apply-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s;
}
.result-card a.apply-btn:hover { background: var(--accent-dark); text-decoration: none; }

.how-to { font-size: 0.78rem; color: var(--muted); margin-top: 0.6rem; }

.results-footer { text-align: center; margin-top: 2rem; }
.results-footer p { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── All Programs ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

@media (max-width: 600px) {
  .hero { padding: 3rem 1rem; }
  nav a:not(.btn-nav) { display: none; }
  .hero-stats { gap: 1.5rem; }
}
