/* ==========================================================================
   Relief for Africa Foundation — Global Stylesheet
   Author: Rebuild (no WordPress)
   Fonts: Inter (body) + Lora (headings) — loaded via <link> in each HTML
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colors (extracted from current site) */
  --rfa-deep:        #173f38;
  --rfa-primary:     #2c5f56;
  --rfa-mid:         #3d9486;
  --rfa-light:       #4aaa9b;
  --rfa-mint:        #eef7f5;
  --rfa-mint-deep:   #dcefe9;
  --rfa-navy:        #15063F;
  --rfa-blue:        #002855;
  --rfa-ink:         #1f2b27;
  --rfa-ink-soft:    #5d6e69;
  --rfa-border:      #d8ebe6;
  --rfa-white:       #ffffff;
  --rfa-shadow:      rgba(23, 63, 56, 0.12);
  --rfa-shadow-soft: rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;

  /* Layout */
  --container:   1180px;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 60px;
  --space-2xl: 90px;

  /* Header height (used for scroll-margin) */
  --header-h: 84px;

  /* Transitions */
  --t-fast: 0.2s ease;
  --t-med:  0.3s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--rfa-ink);
  background: var(--rfa-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--rfa-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--rfa-mid); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { padding-left: 1.2rem; }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--rfa-deep);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 1em; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
.container-narrow { max-width: 820px; }

.section {
  padding-block: var(--space-xl);
}
.section--tight { padding-block: var(--space-lg); }
.section--mint  { background: var(--rfa-mint); }
.section--mint-deep { background: var(--rfa-mint-deep); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* Screen-reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: 8px;
  background: var(--rfa-primary); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 8px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--rfa-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(44,95,86,0.25);
}
.btn--primary:hover { background: var(--rfa-deep); color: #fff; }

.btn--light {
  background: #fff;
  color: var(--rfa-primary);
  border: 1.5px solid var(--rfa-border);
}
.btn--light:hover { background: var(--rfa-mint); color: var(--rfa-deep); }

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.6);
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

.btn--full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: box-shadow var(--t-med), background var(--t-med);
}
.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
  padding-block: 12px;
}

.header-logo img {
  height: 56px;
  width: auto;
}

/* Nav */
.main-nav { display: flex; align-items: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: inline-block;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--rfa-ink);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-list a:hover { color: var(--rfa-primary); background: var(--rfa-mint); }
.nav-list a.is-active { color: var(--rfa-primary); font-weight: 600; }

.header-cta { display: flex; align-items: center; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: background var(--t-fast);
}
.nav-toggle:hover { background: var(--rfa-mint); }
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--rfa-deep);
  border-radius: 2px;
  transition: transform var(--t-med), opacity var(--t-med);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 86vw);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 90px 24px 32px;
    transform: translateX(100%);
    transition: transform var(--t-med);
    box-shadow: -10px 0 40px rgba(0,0,0,0.12);
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav-list a {
    padding: 14px 16px;
    font-size: 1rem;
    border-bottom: 1px solid var(--rfa-border);
    border-radius: 0;
  }

  .header-cta { display: none; }

  /* Backdrop */
  .nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0; pointer-events: none;
    transition: opacity var(--t-med);
    z-index: 890;
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

/* ---------- Page hero (title band) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--rfa-deep), var(--rfa-primary));
  color: #fff;
  text-align: center;
  padding-block: clamp(60px, 8vw, 110px);
}
.page-hero h1 {
  color: #fff;
  margin: 0;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
}
.page-hero p {
  color: rgba(255,255,255,0.9);
  max-width: 640px;
  margin: 16px auto 0;
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--rfa-deep);
  color: rgba(255,255,255,0.82);
  padding-block: var(--space-xl) var(--space-md);
  font-size: 0.93rem;
}
.site-footer a { color: rgba(255,255,255,0.82); }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h5,
.footer-col h6 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.footer-logo {
  height: 62px;
  width: auto;
  margin-bottom: 18px;
}
.footer-address p { margin: 0 0 8px; }
.footer-address a { display: inline-flex; gap: 8px; align-items: flex-start; }
.footer-address svg { flex-shrink: 0; margin-top: 3px; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  text-align: center;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.65);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(37,211,102,0.45);
  z-index: 950;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(37,211,102,0.6);
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: #fff;
  display: block;
}

/* Tooltip on hover */
.whatsapp-float::after {
  content: "WhatsApp us";
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translateY(-50%);
  background: #25D366;
  color: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}
.whatsapp-float:hover::after { opacity: 1; }

@media (max-width: 560px) {
  .whatsapp-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .whatsapp-float svg { width: 28px; height: 28px; }
  .whatsapp-float::after { display: none; }
}

/* ---------- Forms (shared) ---------- */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--rfa-ink);
}
.form-group .required { color: #d63637; }

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--rfa-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--rfa-ink);
  background: #fafcfb;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--rfa-light);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,170,155,0.15);
}
textarea.form-control { resize: vertical; min-height: 110px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

.form-note {
  font-size: 0.86rem;
  color: var(--rfa-light);
  margin-top: 6px;
}

.form-message {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.93rem;
}
.form-message--success {
  background: #e8f5e9;
  color: #1b5e20;
  border-left: 4px solid #2e7d32;
}
.form-message--error {
  background: #ffebee;
  color: #b71c1c;
  border-left: 4px solid #c62828;
}

/* Honeypot (spam protection — hidden) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Utility: animations on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 1024px) {
  :root { --header-h: 76px; }
  .header-logo img { height: 48px; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .section { padding-block: var(--space-lg); }
  .btn { padding: 12px 20px; font-size: 0.92rem; }
}
/* Footer — developer credit */
.footer-credit {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}
.footer-credit a {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-credit a:hover {
  color: #fff;
}