:root {
  --ink: #0f1a2b;
  --ink-2: #1f2f4a;
  --paper: #ffffff;
  --paper-2: #f5f9ff;
  --accent: #1f5fd1;
  --accent-2: #0f82c9;
  --accent-3: #5ca2ff;
  --muted: #4b5a6e;
  --line: #dbe4f1;
  --shadow: 0 16px 50px rgba(15, 26, 43, 0.14);
  --radius: 20px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
}

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

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e6edf7;
  box-shadow: 0 12px 40px rgba(15, 26, 43, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.2px;
  color: var(--ink);
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #bcd6ff, #2b66d9 60%, #0d356f 100%);
  box-shadow: 0 10px 24px rgba(15, 26, 43, 0.18);
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 15px;
}

.nav-links a {
  color: #23344d;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 2px;
}

.nav-links a.active:not(.nav-cta),
.nav-links a[aria-current="page"]:not(.nav-cta) {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

.nav-links a.active:not(.nav-cta),
.nav-links a[aria-current="page"]:not(.nav-cta) {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

.nav-cta {
  padding: 10px 16px;
  background: linear-gradient(135deg, #0f3a7a, #1f5fd1);
  color: white;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  border: 1px solid #e1e8f5;
  background: white;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.hero {
  padding: 80px 0 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.6rem, 4.5vw, 3.8rem);
  margin-bottom: 14px;
}

.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel {
  background: white;
  padding: 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #efe4d6;
}

.hero-panel h3 {
  margin-top: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0 6px;
}

.hero-chip {
  padding: 10px 12px;
  background: #eaf1ff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #1f5fd1;
  text-align: center;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.section {
  padding: 68px 0;
  background: var(--paper);
}

.community-help {
  background: linear-gradient(135deg, #f2f7ff 0%, #ffffff 100%);
}

.section:nth-of-type(even) {
  background: var(--paper-2);
}

.section-divider {
  height: 1px;
  background: var(--line);
  width: min(1140px, 92vw);
  margin: 48px auto 0;
}

.section h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3.3vw, 2.8rem);
  margin-bottom: 12px;
}

.section p.lead {
  color: var(--muted);
  max-width: 760px;
  line-height: 1.7;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.calculator-select {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  max-width: 320px;
}

.calculator-hidden {
  display: none;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(20, 20, 20, 0.06);
}

.card h3 { margin-top: 6px; }

.resource-flash {
  min-height: 210px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 16px;
}

.resource-item {
  display: none;
  padding: 24px;
  gap: 10px;
  display: grid;
  align-content: start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.resource-item.active {
  display: grid;
}

.resource-title {
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}

.resource-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.resource-link:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .resource-item { display: grid; }
}

.perk-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.perk-list li {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f8fb;
  border: 1px solid var(--line);
  font-weight: 600;
  color: var(--ink);
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

.ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #eaf1ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #1f5fd1;
}

.callout {
  background: linear-gradient(135deg, #0f3a7a 0%, #1f5fd1 100%);
  color: #f5f9ff;
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.callout p { color: #e6f0ff; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stat {
  background: white;
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  border: 1px solid var(--line);
}

.form {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

label {
  font-size: 14px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  background: #ffffff;
}

textarea { min-height: 120px; }

.result-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f2f7ff;
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result-amount.good {
  color: #146c2e;
  font-weight: 700;
}

.result-amount.warn {
  color: #b71c1c;
  font-weight: 700;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.result-pill.good {
  background: #e7f6ec;
  color: #146c2e;
  border: 1px solid #2e7d32;
}

.result-pill.warn {
  background: #fdecea;
  color: #b71c1c;
  border: 1px solid #e53935;
}

footer {
  padding: 40px 0 50px;
  border-top: 1px solid var(--line);
  background: #f2f7ff;
}

footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  column-gap: 28px;
  row-gap: 24px;
}

footer .footer-grid > :first-child {
  padding-right: 36px;
}

.footer-links a {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-2);
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .calculator-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .callout { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  footer .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; flex-direction: column; align-items: flex-start; background: white; padding: 16px; border-radius: 12px; border: 1px solid var(--line); position: absolute; right: 4vw; top: 64px; width: 220px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .form-row { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}
