/* Brand tokens — see ../brand-source/README.md for where these values come
   from (the HU-Intl style guide) and which are this site's own extrapolation
   (dark mode isn't part of the source guide). */
:root {
  --bg: #f6f1e7; /* Ivory Paper */
  --surface: #ffffff; /* Warm White */
  --surface-alt: #efe9db;
  --border: #e4dcc8;
  --heading: #1e3a5f; /* Navy Ink */
  --text: #4a4438; /* Ink Grey */
  --text-muted: #6b6456;
  --brand: #4a8fae; /* Ocean Blue */
  --accent: #a67c4e; /* Clay Brown */
  --accent-strong: #8b6640;
  --sage: #8ca06e; /* Sage Green */
  --sage-strong: #66784a; /* Olive Green */
  --sky: #8fc1d4; /* Sky Blue */
  --radius: 16px;
  --shadow: 0 6px 24px rgba(30, 58, 95, 0.1);
  --nav-height: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14212d;
    --surface: #1c2c3a;
    --surface-alt: #203342;
    --border: #35485b;
    --heading: #f3efe3;
    --text: #e7e1d3;
    --text-muted: #abb8c2;
    --brand: #7cc0db;
    --accent: #d9a876;
    --accent-strong: #e6bc90;
    --sage: #a9c088;
    --sage-strong: #c3d6a9;
    --sky: #3e5a68;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden; /* defensive: nothing should cause horizontal scroll, but never let it leak */
}

section[id] {
  scroll-margin-top: var(--nav-height);
}

a {
  color: var(--brand);
}

h1, h2, h3 {
  font-family: "Baloo 2", "Segoe UI", sans-serif;
  line-height: 1.2;
  font-weight: 700;
  color: var(--heading);
}

/* ---------- Nav ---------- */

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--nav-height);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--heading);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span {
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--heading);
}

.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff !important;
}

.nav-cta:hover {
  background: var(--accent-strong);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--heading);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
  min-height: 44px; /* comfortable touch target */
  line-height: 16px;
}

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

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--heading);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- Hero ---------- */

.hero {
  padding: 88px 20px 72px;
  background: radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 55%),
    radial-gradient(circle at 100% 20%, color-mix(in srgb, var(--sage) 14%, transparent), transparent 50%);
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--sage-strong);
  margin-bottom: 18px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  margin: 0 0 20px;
}

.hero-sub {
  font-size: clamp(1rem, 2.4vw, 1.1rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 20px;
}

.section.alt {
  background: var(--surface-alt);
}

.section-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.section h2 {
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  margin: 0 0 14px;
  text-align: center;
}

.section-lede {
  text-align: center;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.08rem);
  max-width: 660px;
  margin: 0 auto 44px;
}

.section-note {
  text-align: center;
  color: var(--text-muted);
  max-width: 620px;
  margin: 36px auto 0;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.96rem;
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
}

/* ---------- Pills (who we serve) ---------- */

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Steps ---------- */

.step-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px;
  margin: 44px 0;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.step p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ---------- Quotes ---------- */

.pull-quote {
  margin: 44px 0 0;
  padding: 26px 28px;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

.pull-quote p {
  margin: 0 0 14px;
}

.pull-quote p:last-child {
  margin-bottom: 0;
}

.quote-label {
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 8px !important;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vision-quote {
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(1.15rem, 3.4vw, 1.4rem);
  font-weight: 700;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 44px;
  color: var(--heading);
  border: none;
  padding: 0;
}

/* ---------- Impact story ---------- */

.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  margin-top: 16px;
}

.story-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.story-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.story-chain span:not([aria-hidden]) {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
}

.story-chain span[aria-hidden] {
  color: var(--text-muted);
}

.story-highlight {
  background: var(--sage) !important;
  color: #fff !important;
  border-color: var(--sage) !important;
}

.story-card p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ---------- Get involved ---------- */

.cta-section .card {
  display: flex;
  flex-direction: column;
}

/* ---------- Footer ---------- */

.site-footer {
  /* Deliberately not var(--brand-strong): that token flips to a pale color
     in dark mode (for headings-on-dark-bg), which would make the footer's
     background go light while its text stays light too. The footer is
     meant to be a constant dark navy band regardless of page theme. */
  background: #1e3a5f;
  color: #eef3f6;
  padding: 44px 20px;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.footer-tagline {
  max-width: 560px;
  margin: 0 auto 16px;
  color: color-mix(in srgb, #eef3f6 80%, transparent);
  font-size: 0.94rem;
}

.footer-meta {
  margin: 0;
  font-size: 0.85rem;
  color: color-mix(in srgb, #eef3f6 65%, transparent);
}

.footer-meta a {
  color: #eef3f6;
}

/* ---------- Responsive: tablet and below ---------- */
/* 920px covers iPad portrait (768) and most small-laptop/tablet-landscape
   widths where the full horizontal nav (brand + 4 links + CTA) genuinely
   doesn't fit without crowding — not just phones. */

@media (max-width: 920px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    box-shadow: var(--shadow);
  }

  .nav-links a {
    width: 100%;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-cta {
    margin-top: 10px;
    text-align: center;
    padding: 12px 18px;
  }
}

/* ---------- Responsive: phones ---------- */
/* Below this, "Hearts Understanding International" plus the icon and the
   hamburger no longer fit on one line without wrapping the nav bar itself
   — drop to just the mark rather than let the row wrap or overflow. */

@media (max-width: 420px) {
  .brand-text {
    display: none;
  }

  .section {
    padding: 56px 16px;
  }

  .hero {
    padding: 64px 16px 56px;
  }

  .card {
    padding: 22px 18px;
  }
}
