:root {
  --bg: #f8f6f0;
  --ink: #1a2120;
  --muted: #415351;
  --brand: #7f47ed; /*#0f766e*/
  --brand-2: #6842c9; /*#2f855a*/
  --card: #ffffff;
  --line: #d9ddd5;
  --hero-overlay: linear-gradient(140deg, #7f47ed 0%, #6b3dd4 45%, #5a32b8 100%);
  /*--hero-overlay: linear-gradient(140deg, #0f766e 0%, #1f7a66 50%, #2b5f72 100%);*/
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Sora", sans-serif;
}

/* Ensure in-page anchor targets scroll into view and aren’t hidden */
[id="about"],
[id="approach"],
[id="consortium"],
[id="publications"],
[id="contact"],
[id="top"],
[id="hero-content"] {
  scroll-margin-top: 1rem;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.hero {
  color: #f8fffd;
  background: var(--hero-overlay);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 24%) 0%, rgb(255 255 255 / 0%) 65%);
  pointer-events: none; /* allow clicks to reach nav and content below */
}

.nav {
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 2;
  /*background: var(--brand);*/
  background: #fff;
}

/* Full-width bar behind nav (nav has .container so content is centered) */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  /*background: var(--brand);*/ 
  background: #fff;
  z-index: -1;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brand {
  color: #f8fffd;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-block;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 3rem;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links a {
  /*color: #f8fffd; /*#1f7a66;*/
  color: #7f47ed;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.nav-links a:hover {
  color: #e9d5ff; /*#eafff8;*/
}

.hero-content {
  padding: 4.5rem 0 5rem;
  position: relative;
  z-index: 1;
}

/* IDRC logo in nav: light background so it reads on purple */
.idrc-logo-wrap {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
  line-height: 0;
}

.idrc-logo {
  display: block;
  width: 1.25in;
  height: auto;
  vertical-align: middle;
}

/* Partner logos row (hero): white background like IDRC */
/* Single white panel in hero, minimal space below partnership text */
.partner-logos-panel-wrap {
  margin-top: 0.75rem;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.partner-logos-panel {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 12px rgb(0 0 0 / 10%);
  /*max-width: 560px;
  margin-left: 0;
  margin-right: auto;*/
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

.partner-logo {
  display: block;
  height: 3rem;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.partner-logo--unwomen {
  height: auto;     /* match others visually */
  width: auto;
  object-fit: contain; /* stretches vertically */
  max-width: 160px;
}

.eyebrow {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

h1,
h2,
h3 {
  /*font-family: "Source Serif 4", serif;*/
  font-family: "Noto Sans", sans-serif;
  line-height: 1.1;
}

h1 {
   /*font-size: clamp(2rem, 4vw, 3.6rem);*/
  font-size: clamp(1.9rem, 3.8vw, 3.4rem);
  max-width: 18ch;
  margin: 0.6rem 0 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 1rem;
}

h3 {
  margin-top: 0;
  font-size: 1.35rem;
}

p {
  line-height: 1.7;
}

.hero p {
  max-width: 70ch;
}

.section {
  padding: 2rem 0;
  animation: fade-up 700ms ease both;
}

.section-soft {
  /* Even lighter purple wash than .section-box-inner — subtle vs. #7f47ed */
  background: linear-gradient(180deg, #fcfbff 0%, #f9f6ff 45%, #f5f0fc 100%);
  border-top: 1px solid rgb(127 71 237 / 8%);
  border-bottom: 1px solid rgb(127 71 237 / 8%);
}

/* Highlight box: light purple (lighter tint of --brand #7f47ed), padded content */
.section-box {
  padding: 2rem 0;
}

.section-box-inner {
  background: linear-gradient(180deg, #f3edff 0%, #ede7fa 100%); /*#e8f5e9;*/
  padding: 2rem 2.5rem;
  border-radius: 8px;
  border: 1px solid rgb(127 71 237 / 12%);
}

.section-box-title {
  color: #5b21b6; /*#2e7d32;*/
  margin-top: 0;
  margin-bottom: 1rem;
}

.section-box-inner p {
  color: #333;
  margin: 0;
  line-height: 1.7;
}

.section-box-inner a {
  color: #6d28d9; /*#1565c0;*/
  text-decoration: underline;
}

.section-box-inner a:hover {
  color: #5b21b6; /*#0d47a1;*/
}

.section-note {
  color: var(--muted);
}

.stats-grid,
.cards-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-quote {
  grid-column: 1 / -1;
  background: #1a1a1a;
  color: #fff;
  margin: 0;
  padding: 1.5rem 1.5rem;
  border-radius: 16px;
  font-size: 1.05rem;
  line-height: 1.6;
}

.stat-card,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 6px 20px rgb(0 0 0 / 4%);
}

.stat-card {
  display: flex;
  flex-direction: column;
}

.card-number {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-align: center;
  line-height: 1;
}

.cards-3-numbered .card h3 {
  text-align: center;
  margin-top: 0;
}

.cards-3-numbered .card p:not(.card-number) {
  color: #333;
  text-align: center;
}

.card--1 {
  background: #e8f4e6;
  border-color: #c8e6c9;
}

.card--1 .card-number,
.card--1 h3 {
  color: #2e7d32;
}

.card--2 {
  background: #e3f2fd;
  border-color: #bbdefb;
}

.card--2 .card-number,
.card--2 h3 {
  color: #1565c0;
}

.card--3 {
  background: #fbf1ec;
  border-color: #ffe0b2;
}

.card--3 .card-number,
.card--3 h3 {
  color: #a3683d;
}

/* “Three Challenges” card 1 only: same as .section-box-inner (icons section keeps .card--1 green) */
.cards-3-numbered .card--1 {
  background: linear-gradient(180deg, #f3edff 0%, #ede7fa 100%);
  border: 1px solid rgb(127 71 237 / 12%);
  box-shadow: none;
}

.cards-3-numbered .card--1 .card-number,
.cards-3-numbered .card--1 h3 {
  color: #5b21b6;
}

/* “Our Approach” icon row: first card matches .section-box-inner */
.cards-3-icons .card--1 {
  background: linear-gradient(180deg, #f3edff 0%, #ede7fa 100%);
  border: 1px solid rgb(127 71 237 / 12%);
  box-shadow: none;
}

.cards-3-icons .card--1 h3 {
  color: #5b21b6;
}

.card-icon {
  display: block;
  font-size: 2.5rem;
  text-align: center;
  margin: 0 0 0.75rem;
  line-height: 1;
}

.cards-3-icons .card h3 {
  text-align: center;
  margin-top: 0;
}

.cards-3-icons .card p {
  color: #333;
  text-align: center;
}

.get-involved-cards .card p {
  color: #333;
}

.get-involved-cards .card--1 {
  background: linear-gradient(180deg, #f3edff 0%, #ede7fa 100%);
  border: 1px solid rgb(127 71 237 / 12%);
  box-shadow: none;
}

.get-involved-cards .card--1 h3 {
  color: #5b21b6;
}

.connected-bridge {
  margin-top: 1.25rem;
}

.connected-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b21b6;
}

.connected-arrow {
  font-size: 0.95rem;
  line-height: 1;
}

.connected-box {
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
}

.connected-box .section-box-title {
  text-align: center;
  font-size: 1.65rem;
  color: #5b21b6;
}

.connected-box p {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.65;
}

.stat {
  margin: 0 0 0.4rem;
  font-size: 2rem;
  color: var(--brand);
  font-weight: 700;
}

.stat-footnote {
  margin: auto 0 0;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.pilot-table {
  min-width: 680px;
}

.pilot-table h3 {
  margin: 0;
  color: #4c1d95;
  line-height: 1.25;
}

.pilot-kicker {
  margin: 0 0 0.15rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1f2b2a;
}

.pilot-subtitle {
  margin: 0;
  font-weight: 600;
  color: #1f2b2a;
}

.pilot-row-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: #4c1d95;
}

.pilot-table td > p:last-child {
  margin-bottom: 0;
}

.pilot-table ul {
  margin: 0;
  padding-left: 1.2rem;
}

.deliverables-wrap {
  margin-top: 1rem;
}

.deliverables-table {
  min-width: 980px;
}

.deliverables-table td {
  width: 25%;
  text-align: center;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  padding: 0.85rem 0.85rem 1rem;
}

.deliverables-table td:last-child {
  border-right: 0;
}

.deliverable-card h3 {
  margin: 0 0 0.55rem;
  line-height: 1.12;
  color: inherit;
}

.deliverable-number {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  
}

.deliverable-card p:last-child {
  margin: 0;
  line-height: 1.45;
}

.deliverable-card p:not(.deliverable-number) {
  color: #333;
}

.deliverable-card--1 {
  background: #f1e9ff;
  color: #3d2bcf;
}

.deliverable-card--2 {
  background: #eaf8ff;
  color: #1565c0;
}

.deliverable-card--3 {
  background: #f5f8f6;
  color: #2e7d32;
}

.deliverable-card--4 {
  background: #fff9ea;
  color: #a3683d;
}

th,
td {
  text-align: left;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #f5f8f6;
  color: #1f2b2a;
  font-weight: 600;
}

.footer {
  background: linear-gradient(180deg, #1a1430 0%, #151028 100%);
  color: #ece8f5;
  padding: 3.2rem 0;
  animation: fade-up 700ms ease both;
}

.footer h2 {
  margin-top: 0;
}

.footer .section-note {
  color: rgba(236 232 245 / 0.88);
}

.footer a {
  color: #c4b5fd;
}

.footer a:hover {
  color: #e9d5ff;
}

.footer-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c4b5fd;
  flex-shrink: 0;
}

.footer-icon svg {
  display: block;
}

.footer-note {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgb(196 181 253 / 20%);
  font-size: 0.8rem;
  color: rgba(236 232 245 / 0.85);
  text-align: center;
}

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

.page-header {
  background: linear-gradient(140deg, #7f47ed 0%, #6842c9 55%, #5a32b8 100%);
  color: #fff;
}

.page-intro {
  max-width: 820px;
  margin: 0 auto;
  padding: 5.5rem 0 5rem;
}

.page-intro h1 {
  margin: 0 0 1rem;
  font-family: "Source Serif 4", serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.95;
}

.page-intro > p:last-child {
  max-width: 720px;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgb(255 255 255 / 88%);
}

.nav-links a[aria-current="page"] {
  color: #4f259f;
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

.publications-page {
  background: #fff;
}

.publication-feed {
  margin-top: 2rem;
}

.publication-entry {
  display: grid;
  grid-template-columns: minmax(230px, 32%) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.publication-entry:last-child {
  border-bottom: 1px solid var(--line);
}

.publication-cover {
  min-height: 390px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 4px;
  color: #fff;
  box-shadow: 0 18px 35px rgb(40 25 80 / 18%);
}

.publication-cover--report {
  background: linear-gradient(155deg, #7f47ed 0%, #34206d 100%);
}

.publication-cover--brief {
  background: linear-gradient(155deg, #1c8e83 0%, #17465d 100%);
}

.publication-cover span,
.publication-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.publication-cover strong {
  font-family: "Source Serif 4", serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 0.98;
}

.publication-cover small {
  line-height: 1.45;
  color: rgb(255 255 255 / 82%);
}

.publication-copy {
  align-self: center;
}

.publication-kicker {
  margin: 0 0 1rem;
  color: var(--brand);
}

.publication-copy h3 {
  max-width: 720px;
  margin: 0 0 1.4rem;
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
}

.publication-copy > p:not(.publication-kicker) {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

.publication-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.publication-link:hover {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

@media (max-width: 900px) {
  .stats-grid,
  .cards-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content {
    padding: 3.2rem 0 3.5rem;
  }

  .stats-grid,
  .cards-3 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
  }

  .page-intro {
    padding: 3.5rem 0;
  }

  .publication-entry {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
  }

  .publication-cover {
    min-height: 320px;
  }
}

/* Floating Go to top button */
.go-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.go-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgb(0 0 0 / 25%);
  background: var(--brand-2);
  color: #fff;
}

.go-to-top svg {
  display: block;
}

/* Events */
[id="events"] {
  scroll-margin-top: 1rem;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.event-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgb(40 25 80 / 8%);
}

.event-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(155deg, #7f47ed 0%, #34206d 100%);
}

.event-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.event-body h3 {
  margin: 0 0 0.9rem;
  font-family: "Source Serif 4", serif;
  font-size: 1.45rem;
  line-height: 1.2;
}

.event-description {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.65;
}

.event-meta {
  display: grid;
  gap: 0.6rem;
  margin: auto 0 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.event-meta div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
}

.event-meta dt {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
}

.event-meta dd {
  margin: 0;
  font-weight: 600;
}

.event-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-links a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.event-links a:hover {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

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