@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --primary: #1d4ed8; /* Deeper blue */
  --primary-dark: #1e3a8a; /* Navy for depth */
  --primary-light: #3b82f6; /* Accent blue */
  --accent: #059669; /* Emerald for "success" moments */
  --text: #111827; /* Near-black for contrast */
  --text-light: #4b5563; /* Darker gray = more readable */
  --bg: #ffffff;
  --bg-alt: #f3f4f6; /* Less stark than pure white */
  --bg-dark: #0f172a; /* For dark sections */
  --border: #d1d5db;
  --success: #10b981;
  --danger: #dc2626;
  --warning: #f59e0b;
  --radius: 12px; /* Softer corners */
  --shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
h1,
h2,
h3,
h4 {
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 800;
}
h1 {
  font-size: 3.25rem;
  max-width: 900px;
  margin: 0 auto 1.5rem;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.5rem;
  font-weight: 700;
}
p {
  margin-bottom: 1rem;
  color: var(--text-light);
}
.subhead {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.section {
  padding: 5rem 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-cta {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary) 100%
  );
  color: white;
}
.section-cta h2,
.section-cta p,
.section-cta h3 {
  color: white;
}

/* Header - Dark navy = instant credibility */
.header {
  background: var(--bg-dark);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
}
.logo-icon {
  font-size: 1.75rem;
  line-height: 1;
}
.logo img {
  height: 40px;
  width: 40px;
  border-radius: var(--radius);
  object-fit: cover;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}
/* Leaflet popup dark theme to match header */
.leaflet-popup-content-wrapper {
  background: var(--bg-dark);
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
  margin: 1rem 1.25rem;
  font-family: "Inter", sans-serif;
}

.leaflet-popup-tip {
  background: var(--bg-dark);
}

.leaflet-popup-close-button {
  color: white !important;
}

.leaflet-popup-close-button:hover {
  color: var(--primary-light) !important;
}
.nav-links a:hover {
  color: white;
}
.nav-links .btn-primary {
  background: var(--primary-light);
}
.nav-links .btn-primary:hover {
  background: white;
  color: var(--primary-dark);
}
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  position: relative;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  background: white;
  left: 0;
  transition: all 0.2s;
}
.hamburger::before {
  top: -8px;
}
.hamburger::after {
  top: 8px;
}

/* Hero - Gradient adds depth */
.hero {
  padding: 7rem 0 5rem;
  text-align: center;
  background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 100%);
}
.hero .container {
  text-align: center;
}
.hero h1 {
  color: var(--primary-dark);
}
.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.proof-bar {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}
.proof-bar div {
  text-align: center;
}
.proof-bar strong {
  display: block;
  font-size: 2rem;
  color: var(--primary);
  font-weight: 900;
}
.proof-bar span {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Problem */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  text-align: center;
}
.stat {
  background: white;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat h3 {
  font-size: 3.5rem;
  color: var(--danger);
  margin-bottom: 0.5rem;
  font-weight: 900;
}

/* Solution - Cards pop more */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.step {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.step-number {
  width: 48px;
  height: 48px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 1.5rem;
  font-size: 1.25rem;
}

/* Map */
#schoolMap {
  height: 500px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 2rem 0 1rem;
  z-index: 1;
  box-shadow: var(--shadow);
}
.map-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
  text-align: center;
}
.map-stat {
  background: white;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.map-stat .stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.map-stat .stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 600;
}
.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.875rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.dot.green {
  background: var(--success);
}
.dot.red {
  background: var(--danger);
}
.dot.yellow {
  background: var(--warning);
}

/* Calculator - Less white, more structure */
.calculator-wrap {
  display: grid;
  gap: 2rem;
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  margin-top: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.calc-inputs {
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: var(--radius);
}
.calc-inputs h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
}
.input-group {
  margin-bottom: 1.5rem;
}
.input-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
}
.input-group input[type="range"] {
  width: 100%;
  margin-bottom: 0.5rem;
  accent-color: var(--primary);
}
.input-value {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
}
.calc-results {
  display: grid;
  gap: 1rem;
}
.result-card {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
}
.result-card.responders {
  border-color: var(--accent);
  background: #ecfdf5;
}
.result-card h4 {
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 800;
}
.result-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.result-stat:last-of-type {
  border-bottom: none;
}
.result-stat.highlight {
  background: white;
  margin: 0.5rem -1.5rem -1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 0 0 var(--radius) var(--radius);
}
.result-stat.highlight .value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
}
.result-impact {
  background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
  color: white;
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.result-impact h3 {
  color: white;
  margin-bottom: 0.5rem;
}
.result-impact .multiplier {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin: 0.5rem 0;
}
.result-impact p {
  color: white;
  opacity: 0.95;
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.result-impact .btn {
  background: white;
  color: var(--accent);
  font-weight: 800;
}
.result-impact .btn:hover {
  transform: scale(1.05);
}

/* CTA */
.cta-options {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}
.cta-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}
.cta-card h3 {
  color: white;
  margin-bottom: 0.75rem;
}
.cta-card p {
  color: rgba(255, 255, 255, 0.9);
}
.cta-card .btn {
  margin-top: 1.5rem;
  background: white;
  color: var(--primary-dark);
  font-weight: 800;
}

/* Footer - Dark = premium */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 4rem 0 1.5rem;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 800;
}
.footer-brand img {
  height: 40px;
  width: 40px;
  border-radius: var(--radius);
}
.footer-links {
  display: flex;
  gap: 2rem;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
}
.footer-links a:hover {
  color: white;
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Mobile */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.875rem;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-links.active {
    display: flex;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .proof-bar {
    gap: 2rem;
    padding: 1.5rem;
  }
  .proof-bar strong {
    font-size: 1.5rem;
  }
  .calculator-wrap {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  .map-stats {
    grid-template-columns: 1fr;
  }
  #schoolMap {
    height: 400px;
  }
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .hero {
    padding: 5rem 0 3rem;
  }
}

@media (min-width: 900px) {
  .calculator-wrap {
    grid-template-columns: 1fr 1.2fr;
  }
  .calc-results {
    grid-template-columns: 1fr 1fr;
  }
  .result-impact {
    grid-column: span 2;
  }
  .cta-options {
    grid-template-columns: repeat(3, 1fr);
  }
}
