:root {
  --ink: #18322f;
  --muted: #5f6f6b;
  --paper: #fbfbf6;
  --surface: #ffffff;
  --line: #dfe7df;
  --green: #16735f;
  --green-dark: #0e4f43;
  --coral: #dc6b54;
  --gold: #d99a31;
  --shadow: 0 18px 45px rgba(24, 50, 47, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(251, 251, 246, 0.92);
  border-bottom: 1px solid rgba(223, 231, 223, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border: 1px solid rgba(22, 115, 95, 0.14);
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  background: #fff;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.metric span,
footer span,
.fund-box span,
.fund-box small {
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 30px);
  font-size: 0.95rem;
}

.nav a {
  padding: 10px 2px;
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.header-action:hover,
.filter:hover {
  transform: translateY(-1px);
}

.primary,
.header-action {
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 26px rgba(22, 115, 95, 0.22);
}

.secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.compact {
  width: 100%;
  margin-top: 14px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-overlay {
  background:
    radial-gradient(circle at 78% 34%, rgba(217, 154, 49, 0.45), transparent 22%),
    radial-gradient(circle at 86% 72%, rgba(220, 107, 84, 0.42), transparent 28%),
    linear-gradient(120deg, #0e4f43 0%, #16735f 49%, #eef7f2 100%);
}

.hero-emblem {
  position: absolute;
  right: clamp(22px, 8vw, 120px);
  bottom: clamp(44px, 9vw, 120px);
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(210px, 29vw, 390px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 34px rgba(255, 255, 255, 0.06), 0 28px 80px rgba(8, 41, 35, 0.28);
}

.care-circle {
  display: grid;
  width: 46%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: #fff;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  font-weight: 950;
}

.care-line {
  position: absolute;
  bottom: 25%;
  width: 74%;
  height: 18%;
  border: 12px solid rgba(255, 255, 255, 0.86);
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 36px));
  margin-left: clamp(18px, 6vw, 84px);
  padding: 80px 0 118px;
  color: #fff;
}

.hero .eyebrow {
  color: #a7ead7;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.hero-copy {
  width: min(620px, 100%);
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.eyebrow {
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quick-give,
.section,
.facility,
.contact {
  padding: clamp(52px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.quick-give {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 1.25fr);
  gap: 32px;
  align-items: end;
  background: #e8f2ec;
}

.give-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.give-intro p {
  color: var(--muted);
  line-height: 1.65;
}

.payment-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(22, 115, 95, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 50, 47, 0.08);
}

.payment-details div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.payment-details span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-details strong {
  color: var(--green-dark);
  overflow-wrap: anywhere;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.15;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.section-heading {
  width: min(760px, 100%);
  margin-bottom: 28px;
}

.section-heading p,
.facility-copy p,
.contact p,
.step-grid p,
.tier-card p,
.roadmap p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.step-grid,
.impact-card-grid,
.tier-grid,
.trust-grid,
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-grid article,
.impact-card-grid article,
.tier-card,
.trust-grid article,
.testimonial-grid blockquote {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 50, 47, 0.08);
}

.step-grid article span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-weight: 950;
}

.impact-menu {
  background: #fff;
}

.impact-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.impact-card-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--green-dark);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.impact-card-grid span,
.trust-grid span {
  color: var(--muted);
  line-height: 1.6;
}

.tiers {
  background: #eef7f2;
}

.tier-card h3 {
  font-size: 2rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter.is-active {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-visual {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 68% 24%, rgba(255, 255, 255, 0.42), transparent 15%),
    linear-gradient(135deg, #16735f, #0e4f43);
}

.profile-visual.alt {
  background:
    radial-gradient(circle at 68% 24%, rgba(255, 255, 255, 0.42), transparent 15%),
    linear-gradient(135deg, #dc6b54, #8f3f31);
}

.profile-visual.gold {
  background:
    radial-gradient(circle at 68% 24%, rgba(255, 255, 255, 0.45), transparent 15%),
    linear-gradient(135deg, #d99a31, #805312);
}

.profile-visual.image-visual {
  background: none;
  display: block;
  overflow: hidden;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.profile-visual span {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border: 6px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 2.25rem;
  font-weight: 950;
}

.profile-body {
  padding: 20px;
}

.profile-body p {
  min-height: 78px;
  color: var(--muted);
  line-height: 1.55;
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #dff1e9;
  font-size: 0.78rem;
  font-weight: 900;
}

.progress {
  height: 9px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0eb;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--gold));
}

.facility {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 36px;
  align-items: center;
  background: #fff;
}

.roadmap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.roadmap article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf7;
}

.roadmap span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap strong,
.trust-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 28px 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink);
  font-weight: 750;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 1px;
  content: "✓";
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 0.78rem;
}

.fund-box {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf7;
  box-shadow: var(--shadow);
}

.fund-box strong {
  display: block;
  margin: 10px 0 6px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.large {
  height: 14px;
}

.impact {
  background: #f4ede3;
}

.trust {
  background: #e8f2ec;
}

.privacy-note {
  background: #fff;
}

.testimonial-grid blockquote {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.65;
}

.testimonial-grid cite {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
  border: 1px solid rgba(24, 50, 47, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.metric strong {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  color: #fff;
  background: var(--green-dark);
}

.contact .eyebrow,
.contact p {
  color: rgba(255, 255, 255, 0.76);
}

dialog {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
}

dialog::backdrop {
  background: rgba(12, 28, 25, 0.55);
}

.dialog-card {
  position: relative;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.mpesa {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 16px;
  border-radius: 8px;
  background: #e8f2ec;
}

.pledge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 26px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #fff;
}

.floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: #25d366;
  box-shadow: 0 14px 32px rgba(15, 90, 55, 0.26);
  font-weight: 900;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .quick-give,
  .facility,
  .contact {
    grid-template-columns: 1fr;
  }

  .give-panel,
  .profile-grid,
  .metric-grid,
  .step-grid,
  .impact-card-grid,
  .tier-grid,
  .trust-grid,
  .testimonial-grid,
  .roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 68px;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand small,
  .header-action {
    display: none;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    width: calc(100% - 36px);
    margin: 0 18px;
    padding-bottom: 96px;
  }

  .give-panel,
  .profile-grid,
  .metric-grid,
  .step-grid,
  .impact-card-grid,
  .tier-grid,
  .trust-grid,
  .testimonial-grid,
  .roadmap {
    grid-template-columns: 1fr;
  }

  .profile-body p {
    min-height: auto;
  }

  .contact-actions .button,
  .hero-actions .button {
    width: 100%;
  }
}

/* ==========================================================================
   ADDED CUSTOM ENHANCEMENTS STYLING
   ========================================================================== */

/* 1. Mobile Hamburger Menu Toggle Styling */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 25;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--ink);
  border-radius: 9px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Transform into X when open */
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Nav Drawer overrides */
@media (max-width: 980px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none; /* overrides default block/flex on mobile */
  }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(251, 251, 246, 0.98);
    backdrop-filter: blur(16px);
    z-index: 22;
    padding: 40px 24px;
    gap: 24px;
    align-items: center;
    justify-content: flex-start;
    animation: slideDown 0.3s ease forwards;
    border-bottom: 2px solid var(--line);
  }

  .nav.is-open a {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ink);
    width: 100%;
    text-align: center;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. Copy Buttons Styling */
.copy-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
}

.copy-value-row strong {
  flex-grow: 1;
  min-width: 0;
}

.copy-btn,
.btn-copy-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--green);
  background: #fff;
  border: 1px solid rgba(22, 115, 95, 0.3);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.copy-btn:hover,
.btn-copy-small:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.copy-btn.copied,
.btn-copy-small.copied {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}

/* 3. My Pledges Section styling */
.my-pledges-box {
  width: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.my-pledges-box h3 {
  margin-bottom: 6px;
  color: var(--green-dark);
  font-size: 1.45rem;
}

.my-pledges-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.my-pledges-list {
  display: grid;
  gap: 12px;
}

.my-pledge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #f8fbf7;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform 150ms ease;
}

.my-pledge-item:hover {
  transform: translateX(4px);
}

.my-pledge-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-pledge-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.my-pledge-purpose {
  font-weight: 750;
  font-size: 0.98rem;
}

.my-pledge-amount {
  font-weight: 850;
  color: var(--green-dark);
}

.btn-delete-pledge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--coral);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 150ms ease;
}

.btn-delete-pledge:hover {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}

/* 4. Unified Dialog Step Forms Styling */
.dialog-card {
  max-width: 520px;
  margin: 0 auto;
}

.modal-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  text-align: left;
}

.modal-form-fields label {
  text-align: left;
}

.modal-form-fields input {
  margin-top: 6px;
}

.dialog-copy-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(22, 115, 95, 0.15);
}

.dialog-copy-item:last-child {
  border-bottom: none;
}

.copy-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.payment-title {
  font-weight: 900;
  color: var(--green-dark);
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(22, 115, 95, 0.25);
  padding-bottom: 4px;
}

/* 5. Metrics counter layout adjustments & Progress animations */
.progress span {
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 6. Field Realities Gallery Section styling */
.realities {
  background: #e8f2ec;
}

.realities-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.reality-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.reality-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(24, 50, 47, 0.18);
}

.reality-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.reality-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.reality-body {
  padding: 20px;
}

.reality-body h3 {
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.reality-body p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 768px) {
  .realities-grid {
    grid-template-columns: 1fr;
  }
}
