/* ===========================================================
   Dr. KeDiBone Mokwena Foundation — Mockup styles
   Inspired by: Trevor Noah Foundation, Rethink Mental Illness, INYATHELO
   =========================================================== */

/* ---------- Tokens ---------- */
:root {
  --kb-ink: #1a1a1a;
  --kb-white: #ffffff;
  --kb-cream: #f5f3ef;
  --kb-leaf: #2d5a27;
  --kb-leaf-dark: #1a3a17;
  --kb-leaf-light: #3d7a35;
  --kb-orange: #e67e22;
  --kb-orange-dark: #c46a1a;
  --kb-orange-light: #f0a04b;
  --kb-sage: #7a9e6b;
  --kb-sage-light: #d4e5cc;
  --kb-rule: #e5e2dc;
  --kb-rule-dark: #c4c0b8;
  --kb-purple: #6b2c8e;
  --kb-purple-light: #f0e6f5;

  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 10vw, 120px);
  --section-y-inner: clamp(40px, 6vw, 64px);

  --radius-pill: 999px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --t-fast: 160ms ease-out;
  --t-base: 220ms ease-out;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--kb-ink);
  background: var(--kb-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--kb-leaf); text-decoration: underline; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--kb-orange); outline-offset: 3px; border-radius: 4px; }

/* ---------- Proposal strip ---------- */
.proposal-strip {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #2d2d2f;
  color: #fff;
  padding: 12px 0;
  border-bottom: 2px solid #e85d5d;
  font-family: var(--font-body);
}
.proposal-strip__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.proposal-strip__label {
  font-size: 0.875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  color: #fff;
}
.proposal-strip__label .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #e85d5d;
  border-radius: 50%;
  margin-right: 10px;
  animation: proposal-pulse 1.5s ease-in-out infinite;
}
@keyframes proposal-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.proposal-strip__hint {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  flex: 1 1 auto;
  text-align: center;
}
.proposal-strip__exit {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.proposal-strip__exit:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section-inner { padding-block: var(--section-y-inner); }
.bg-cream { background: var(--kb-cream); }
.bg-leaf { background: var(--kb-leaf); color: #fff; }
.bg-leaf-dark { background: var(--kb-leaf-dark); color: #fff; }
.bg-sage-light { background: var(--kb-sage-light); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--kb-rule);
}
.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--kb-ink); }
.brand .brand-word { font-family: var(--font-body); font-size: 1.15rem; font-weight: 700; letter-spacing: 0.02em; }
.nav { display: flex; gap: 32px; }
.nav a {
  color: var(--kb-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.nav a:hover, .nav a.active { border-bottom-color: var(--kb-orange); color: var(--kb-leaf); }
.header-right { display: flex; gap: 12px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--kb-orange); color: #fff; }
.btn-primary:hover { background: var(--kb-orange-dark); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--kb-leaf); border-color: var(--kb-leaf); }
.btn-secondary:hover { background: var(--kb-leaf); color: #fff; }
.btn-white { background: #fff; color: var(--kb-leaf); }
.btn-white:hover { background: var(--kb-cream); }
.btn-outline-white { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-white:hover { background: #fff; color: var(--kb-leaf); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ---------- Hero (Trevor Noah style) ---------- */
.hero {
  position: relative;
  min-height: clamp(600px, calc(100vh - 120px), 800px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--kb-leaf-dark);
}
.hero__bg img, .hero__bg .photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,40,15,0.65) 0%, rgba(18,40,15,0.45) 50%, rgba(18,40,15,0.70) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
  text-align: center;
  color: #fff;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--kb-orange-light);
  margin-bottom: 20px;
}
.hero__headline {
  font-family: var(--font-body);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 16ch;
  margin: 0 auto 24px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}
.hero__lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  max-width: 56ch;
  margin: 0 auto 36px;
  opacity: 0.95;
  line-height: 1.6;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Photo placeholder ---------- */
.photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--kb-sage-light) 0%, var(--kb-cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kb-sage);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  padding: 24px;
}

/* ---------- Section headings ---------- */
.section-head { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { max-width: 60ch; margin: 0 auto; }

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--kb-orange);
  margin-bottom: 12px;
}
.eyebrow--white { color: var(--kb-orange-light); }

h1, h2, h3, h4 {
  font-family: var(--font-body);
  color: var(--kb-ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 700; }

.lead { font-size: 1.125rem; line-height: 1.65; color: var(--kb-ink); max-width: 65ch; opacity: 0.85; }
p { margin: 0 0 1em; max-width: 65ch; }

/* ---------- Icon circle (Rethink style) ---------- */
.icon-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2.5rem;
}
.icon-circle--sage { background: var(--kb-sage-light); }
.icon-circle--purple { background: var(--kb-sage-light); }
.icon-circle--cream { background: var(--kb-sage-light); }

/* ---------- Stats grid ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  text-align: center;
  padding: 32px 20px;
}
.stat-card__number {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--kb-leaf);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--kb-ink);
  margin-bottom: 6px;
}
.stat-card__desc {
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0;
}

/* ---------- Programme cards ---------- */
.programme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .programme-grid { grid-template-columns: 1fr; } }

.programme-card {
  background: var(--kb-white);
  border: 1px solid var(--kb-rule);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.programme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.programme-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 4px;
}
.programme-card__icon--literacy { background: var(--kb-sage-light); }
.programme-card__icon--garden { background: var(--kb-sage-light); }
.programme-card__icon--life { background: var(--kb-sage-light); }
.programme-card__icon--community { background: var(--kb-sage-light); }
.programme-card h3 { margin-bottom: 4px; color: var(--kb-leaf-dark); }
.programme-card p { font-size: 0.9375rem; opacity: 0.8; margin: 0 0 8px; }
.programme-card .meta { list-style: none; margin: 0 0 12px; padding: 0; }
.programme-card .meta li {
  padding: 8px 0;
  border-bottom: 1px solid var(--kb-rule);
  font-size: 0.875rem;
}
.programme-card .meta li strong { color: var(--kb-leaf); }
.programme-card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }

/* ---------- Feature grid (3-col, Rethink style) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 820px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-item { text-align: center; }
.feature-item h3 { margin: 16px 0 10px; }
.feature-item p { font-size: 0.9375rem; opacity: 0.8; margin: 0 auto; max-width: 36ch; }

/* ---------- Donation tiers ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .tier-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tier-grid { grid-template-columns: 1fr; } }

.tier-card {
  background: var(--kb-white);
  border: 2px solid var(--kb-rule);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: all var(--t-base);
}
.tier-card:hover {
  border-color: var(--kb-orange);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.tier-card .tier-amount {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--kb-leaf);
  margin-bottom: 4px;
}
.tier-card .tier-period {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--kb-orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.tier-card p { font-size: 0.9375rem; opacity: 0.8; margin-bottom: 24px; flex: 1; }

/* ---------- News cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 820px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  background: var(--kb-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--kb-rule);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.news-card__image {
  aspect-ratio: 16 / 10;
  background: var(--kb-cream);
  overflow: hidden;
}
.news-card__image img, .news-card__image .photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-card__body { padding: 24px; }
.news-card__body h3 { font-size: 1.125rem; margin-bottom: 8px; }
.news-card__body p { font-size: 0.9375rem; opacity: 0.75; margin: 0; }
.news-card__date {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kb-orange);
  margin-bottom: 8px;
}

/* ---------- Story block ---------- */
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (max-width: 820px) { .story-grid { grid-template-columns: 1fr; } }

.story-image {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.story-image img, .story-image .photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-content blockquote {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
  color: var(--kb-leaf);
  margin: 0 0 20px;
}
.story-content p { opacity: 0.85; margin-bottom: 16px; }

/* ---------- Review / Quote cards ---------- */
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .review-grid { grid-template-columns: 1fr; } }

.review-card {
  background: var(--kb-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--kb-rule);
}
.review-card__quote {
  font-size: 1.125rem;
  line-height: 1.5;
  font-style: italic;
  margin: 0 0 16px;
}
.review-card__cite {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--kb-leaf);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--kb-leaf);
  color: #fff;
  padding-block: var(--section-y);
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 16px; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 56ch; margin: 0 auto 28px; }

/* ---------- Get Involved cards ---------- */
.engage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .engage-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .engage-grid { grid-template-columns: 1fr; } }

.engage-card {
  background: var(--kb-white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--kb-rule);
  transition: all var(--t-base);
}
.engage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.engage-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 16px;
}
.engage-card h3 { margin-bottom: 8px; font-size: 1.125rem; }
.engage-card p { font-size: 0.875rem; opacity: 0.75; margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--kb-leaf-dark); color: #fff; padding-block: 64px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: clamp(24px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-weight: 700; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--kb-orange-light); margin: 0 0 20px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 12px; }
.site-footer a { color: #fff; text-decoration: none; opacity: 0.8; font-size: 0.9375rem; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.footer-bar {
  max-width: var(--maxw); margin: 48px auto 0; padding: 20px var(--gutter) 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 0.8125rem; opacity: 0.6; flex-wrap: wrap;
}

/* ---------- Page header ---------- */
.page-header {
  position: relative;
  background: var(--kb-leaf-dark);
  color: #fff;
  padding: clamp(80px, 12vw, 140px) 24px;
  text-align: center;
  overflow: hidden;
}
.page-header__bg {
  position: absolute;
  inset: 0;
}
.page-header__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.page-header__bg .photo-placeholder {
  opacity: 1;
  background: linear-gradient(135deg, var(--kb-leaf) 0%, var(--kb-leaf-dark) 100%);
}
.page-header__content { position: relative; z-index: 1; }
.page-header h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 16px; color: #fff; }
.page-header p { font-size: 1.125rem; opacity: 0.9; max-width: 56ch; margin: 0 auto; color: rgba(255,255,255,0.85); }

/* ---------- Trust items ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
@media (max-width: 760px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-item .icon { font-size: 2.5rem; margin-bottom: 16px; }
.trust-item h4 { font-size: 1.25rem; margin-bottom: 8px; }
.trust-item p { font-size: 0.9375rem; opacity: 0.75; margin: 0 auto; max-width: 36ch; }

/* ---------- Newsletter ---------- */
.newsletter-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 520px;
  margin: 28px auto 0;
}
.newsletter-form input {
  flex: 1 1 240px;
  padding: 14px 20px;
  border: 1px solid var(--kb-rule-dark);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  background: var(--kb-white);
}

/* ---------- Divider ---------- */
.section-divider { height: 1px; background: var(--kb-rule); border: 0; margin: 0; }

/* ---------- Contact cards (compact) ---------- */
.contact-card {
  background: var(--kb-white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid var(--kb-rule);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-card svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-card h4 {
  font-size: 1rem;
  margin: 0 0 4px;
}
.contact-card p {
  font-size: 0.875rem;
  opacity: 0.75;
  margin: 0;
}
.contact-card--dark {
  background: var(--kb-leaf);
  color: #fff;
  border-color: var(--kb-leaf);
}
.contact-card--dark h4 { color: #fff; }
.contact-card--dark p { color: rgba(255,255,255,0.85); }

/* ---------- News card link ---------- */
.news-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.news-card__link:hover .news-card__image img {
  transform: scale(1.04);
}
.news-card__image img {
  transition: transform 0.4s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .proposal-strip__hint { display: none; }
  .nav { display: none; }
}
