:root {
  --green: #07944a;
  --deep: #063f32;
  --mint: #dff6ec;
  --lime: #b7e5c6;
  --ink: #17312c;
  --muted: #5c706b;
  --soft: #f5faf7;
  --white: #ffffff;
  --gold: #d9a441;
  --shadow: 0 24px 70px rgba(6, 63, 50, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(7, 148, 74, 0.14);
  backdrop-filter: blur(16px);
}

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

.brand img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--mint);
}

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

.brand strong {
  font-size: 0.98rem;
  line-height: 1.15;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 13px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 6px;
}

.main-nav a:hover {
  color: var(--deep);
  background: var(--mint);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(7, 148, 74, 0.2);
  background: var(--white);
  border-radius: 6px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--deep);
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(115deg, rgba(6, 63, 50, 0.92), rgba(7, 148, 74, 0.78)),
    url("tmf-logo.jpg") center right 10% / min(62vw, 720px) no-repeat,
    var(--deep);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-text {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--white);
  color: var(--deep);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: var(--white);
}

.hero-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(24px, 4vw, 38px);
  color: var(--deep);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-carousel {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--deep);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 800ms ease, transform 2000ms ease;
}

.hero-photo.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-caption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 14px;
  color: var(--white);
  background: linear-gradient(120deg, rgba(4, 43, 35, 0.86), rgba(7, 148, 74, 0.74));
  border-radius: 8px;
}

.carousel-caption span,
.carousel-caption strong {
  display: block;
}

.carousel-caption span {
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.carousel-caption strong {
  margin-top: 3px;
  line-height: 1.2;
}

.logo-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--mint);
  border-radius: 8px;
}

.logo-chip img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  flex: 0 0 auto;
}

.logo-chip span {
  color: var(--deep);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.25;
}

.hero-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.hero-panel div {
  padding-top: 14px;
  border-top: 1px solid rgba(7, 148, 74, 0.14);
}

.hero-panel dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.home-engagements {
  padding: clamp(34px, 5vw, 58px) 0 clamp(44px, 6vw, 72px);
  background: var(--white);
  overflow: hidden;
}

.engagement-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  padding: 0 clamp(20px, 5vw, 72px) 24px;
}

.engagement-heading h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.08;
}

.engagement-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 34vw);
  gap: 16px;
  padding: 0 clamp(20px, 5vw, 72px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.engagement-rail figure {
  position: relative;
  min-height: 310px;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border-radius: 8px;
  background: var(--deep);
  box-shadow: 0 16px 38px rgba(6, 63, 50, 0.12);
}

.engagement-rail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.engagement-rail figure:hover img {
  transform: scale(1.05);
}

.engagement-rail figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 10px 12px;
  color: var(--white);
  background: rgba(4, 43, 35, 0.82);
  border-radius: 6px;
  font-weight: 900;
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(20px, 5vw, 72px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-bottom: 36px;
}

.section-heading.narrow {
  display: block;
  max-width: 760px;
}

.section h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  color: var(--muted);
  font-size: 1.04rem;
}

.mission-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(7, 148, 74, 0.18);
}

.mission-band article {
  padding: clamp(34px, 6vw, 70px) clamp(20px, 5vw, 72px);
  background: var(--white);
}

.mission-band span {
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
}

.mission-band h3 {
  max-width: 760px;
  margin: 10px 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.12;
}

.mission-band p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

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

.program-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  padding: 24px;
  background: var(--white);
  border: 1px solid rgba(7, 148, 74, 0.12);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(6, 63, 50, 0.07);
}

.program-card .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  color: var(--white);
  background: var(--green);
  border-radius: 6px;
  font-size: 1.5rem;
  font-weight: 900;
}

.program-card h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.22;
}

.program-card p {
  margin: 0;
  color: var(--muted);
}

.program-card span {
  margin-top: auto;
  padding-top: 20px;
  color: var(--deep);
  font-weight: 800;
}

.hiv-care {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(58px, 8vw, 104px) clamp(20px, 5vw, 72px);
  background: var(--white);
}

.hiv-care-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hiv-care h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.hiv-care p {
  color: var(--muted);
  font-size: 1.03rem;
}

.care-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.care-list li {
  position: relative;
  padding: 13px 14px 13px 42px;
  color: var(--deep);
  background: var(--mint);
  border-radius: 6px;
  font-weight: 800;
}

.care-list li::before {
  content: "+";
  position: absolute;
  left: 14px;
  top: 11px;
  color: var(--green);
  font-weight: 900;
}

.photo-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  background: rgba(7, 148, 74, 0.18);
}

.photo-story figure {
  margin: 0;
  background: var(--white);
}

.photo-story img {
  display: block;
  width: 100%;
  aspect-ratio: 1.75;
  object-fit: cover;
}

.photo-story figcaption {
  padding: 18px clamp(20px, 4vw, 34px) 24px;
  color: var(--muted);
  font-weight: 700;
}

.impact-section {
  background: var(--deep);
  color: var(--white);
}

.impact-section h2 {
  color: var(--white);
}

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

.impact-list article {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.impact-list strong {
  display: block;
  margin-bottom: 12px;
  color: var(--lime);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.impact-list span {
  color: rgba(255, 255, 255, 0.78);
}

.values-section {
  background: var(--white);
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.values span {
  padding: 12px 16px;
  color: var(--deep);
  background: var(--mint);
  border: 1px solid rgba(7, 148, 74, 0.12);
  border-radius: 6px;
  font-weight: 800;
}

.governance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: start;
}

.governance-layout p {
  color: var(--muted);
}

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

.clean-list li {
  padding: 16px;
  background: var(--white);
  border-left: 4px solid var(--green);
  border-radius: 6px;
}

.registration-box {
  padding: 28px;
  background: var(--white);
  border: 1px solid rgba(7, 148, 74, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.registration-box h3 {
  margin-top: 0;
  font-size: 1.6rem;
}

.partners {
  padding: 34px clamp(20px, 5vw, 72px);
  background: var(--mint);
  overflow: hidden;
}

.partner-track {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.partner-track span {
  padding: 10px 14px;
  background: var(--white);
  border-radius: 6px;
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.55fr);
  gap: 36px;
  align-items: start;
  padding: clamp(58px, 8vw, 104px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(120deg, rgba(6, 63, 50, 0.93), rgba(7, 148, 74, 0.82)),
    var(--deep);
  color: var(--white);
}

.contact-section p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.8);
}

.contact-card {
  display: grid;
  gap: 10px;
  padding: 28px;
  color: var(--deep);
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-card h3,
.contact-card p {
  margin: 0;
}

.contact-card p {
  color: var(--muted);
}

.contact-card a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-card address {
  color: var(--muted);
  font-style: normal;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(20px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.72);
  background: #042b23;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1080px) {
  .program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 83px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--white);
    border: 1px solid rgba(7, 148, 74, 0.16);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .hero,
  .engagement-heading,
  .section-heading,
  .two-column,
  .mission-band,
  .hiv-care,
  .photo-story,
  .impact-list,
  .governance-layout,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
    background:
      linear-gradient(115deg, rgba(6, 63, 50, 0.94), rgba(7, 148, 74, 0.82)),
      var(--deep);
  }

  .hero h1 {
    font-size: clamp(2.7rem, 16vw, 4.6rem);
  }

  .hero-panel {
    align-self: auto;
  }

  .home-carousel {
    min-height: 280px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .engagement-rail {
    grid-auto-columns: 82vw;
  }

  .program-card {
    min-height: 300px;
  }

  .site-footer {
    flex-direction: column;
  }
}
