/* Base reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #111;
  line-height: 1.6;
  background: #ffffff;
}

/* Layout */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

main.container,
header .container,
footer .container {
  max-width: 72rem;
}

header {
  border-bottom: 1px solid #e5e7eb;
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
}

nav img {
  height: 56px;
  width: auto;
  display: block;
}

nav a {
  text-decoration: none;
  color: #111;
  font-size: 0.95rem;
}

nav a:hover {
  text-decoration: underline;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  border: 1px solid #e5e7eb;
  background: transparent;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font: inherit;
}

.nav-toggle::before {
  content: "☰";
  font-size: 1.1rem;
  line-height: 1;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
}

/* Content */
section {
  margin-top: 4rem;
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  font-weight: 500;
}

p {
  margin-top: 1rem;
  max-width: 60ch;
}

/* ===== Homepage spacing fixes ===== */

/* Remove large gap above first homepage section */
main.container > section:first-child {
  margin-top: 0;
}

/* Reduce gap between homepage H1 section and next section */
main.container > section:first-child + section {
  margin-top: 2rem;
}

/* ===== Quote blocks (homepage + elsewhere) ===== */

.quote-section {
  margin-top: 2.5rem;
}

.quote-block {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 1.75rem;
  max-width: 60ch;
}

.quote-text {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.5;
}

/* Footer */
footer {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #444;
}

/* ===== Contact form ===== */

form {
  max-width: 640px;
  width: 100%;
}

form > div {
  margin-bottom: 18px;
}

form label {
  display: block;
  margin-bottom: 8px;
}

form input,
form textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
}

form input {
  height: 44px;
}

form textarea {
  min-height: 220px;
  resize: vertical;
}

/* Submit button */
form button[type="submit"] {
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px 20px;
  font: inherit;
  cursor: pointer;
  margin-top: 24px;
}

form button[type="submit"]:hover {
  background-color: #1e4ed8;
}

/* ===== How It Works diagram ===== */

.hiw-diagram {
  border: 2px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  max-width: 640px;
}

.hiw-box,
.hiw-side {
  border-top: 2px solid #d1d5db;
  padding: 28px 16px;
  text-align: center;
  font-weight: 500;
}

.hiw-top {
  border-top: none;
  border-bottom: 2px solid #d1d5db;
}

.hiw-middle {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  height: 220px;
}

.hiw-center {
  border-left: 2px solid #d1d5db;
  border-right: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hiw-side {
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* Diagram mobile */
@media (max-width: 420px) {
  .hiw-middle {
    grid-template-columns: 1fr;
    height: auto;
  }

  .hiw-center {
    border-left: none;
    border-right: none;
  }

  .hiw-side {
    writing-mode: horizontal-tb;
    transform: none;
    padding: 18px 16px;
  }
}
/* Outcomes section spacing */
.outcomes h2 {
  margin-bottom: 1rem;
}

.outcomes h3 {
  margin-top: 2rem;
}

.outcomes p {
  margin-bottom: 2rem;
}
/* Tighten spacing only between Outcomes (h2) and the first h3 */
.outcomes h2 + h3 {
  margin-top: 1rem;
}
