:root {
  --purple: #4b2e83;
  --purple-dark: #2f195b;
  --purple-ink: #24133f;
  --gold: #f2c75c;
  --gold-dark: #8b6410;
  --teal: #006b6b;
  --teal-dark: #004f50;
  --ink: #202124;
  --muted: #5f6368;
  --line: #d9d6df;
  --soft: #f5f4f7;
  --paper: #ffffff;
  --page: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
video:focus-visible {
  box-shadow: 0 0 0 4px #fff;
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--purple-dark);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-width {
  width: min(calc(100% - 48px), var(--page));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  min-height: 76px;
  padding: 12px 32px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--purple-ink);
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border: 6px solid var(--purple);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span::before,
.brand-mark span::after {
  position: absolute;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--gold);
}

.brand-mark::before { top: -7px; left: 4px; }
.brand-mark::after { right: -7px; top: 4px; }
.brand-mark span::before { bottom: -7px; left: 4px; }
.brand-mark span::after { left: -7px; top: 4px; }

.primary-nav {
  display: flex;
  gap: 28px;
}

.primary-nav a {
  color: #3f3f46;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.primary-nav a:hover {
  color: var(--purple);
}

.nav-toggle {
  display: none;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.button-primary {
  color: #fff;
  background: var(--purple);
}

.button-primary:hover {
  background: var(--purple-dark);
}

.button-secondary {
  color: var(--purple);
  background: #fff;
  border-color: #8f86a3;
}

.button-secondary:hover {
  border-color: var(--purple);
}

.hero {
  position: relative;
  height: clamp(420px, 56vh, 500px);
  overflow: hidden;
  color: #fff;
  background: var(--purple-dark);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero-shade {
  background: rgba(34, 20, 58, 0.82);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 52px 0 44px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 720px;
  margin: 18px 0 22px;
  color: #f3f1f5;
  font-size: 21px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--purple);
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link.light {
  color: #fff;
}

.hero-note {
  margin: 22px 0 0;
  color: #d9d5df;
  font-size: 13px;
}

.section {
  padding: 76px 0;
  scroll-margin-top: 24px;
}

.intro-grid,
.section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 80px;
  align-items: start;
}

.section h2 {
  margin: 0;
  color: var(--purple-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: 0;
}

.hub-fold {
  margin-top: 64px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.hub-fold h3 {
  margin: 0;
  color: var(--purple-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.intro-copy p,
.section-heading-row > p,
.evidence-copy > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.scope-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 52px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scope-row article {
  padding: 28px 34px 30px 0;
}

.scope-row article + article {
  padding-left: 34px;
  border-left: 1px solid var(--line);
}

.stage > span,
.lifecycle-row > div > span {
  color: var(--gold-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
}

.scope-row h3 {
  margin: 0 0 8px;
  color: var(--purple-ink);
  font-size: 19px;
}

.scope-row p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.evidence-section h2 {
  color: #fff;
}

.light-kicker {
  color: var(--gold);
}

.stage-flow {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin-top: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stage {
  min-height: 195px;
  padding: 25px 22px 25px 0;
}

.stage + .stage {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.stage strong {
  display: block;
  margin: 28px 0 7px;
  color: var(--purple-ink);
  font-size: 18px;
}

.stage p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hub-links {
  margin-top: 30px;
}

.openmrs-section,
.catalyst-section {
  background: var(--soft);
}

.feature-media {
  margin-top: 42px;
}

.feature-media video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid #c8c4cd;
  border-radius: 6px 6px 0 0;
}

.media-caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #c8c4cd;
  border-top: 0;
  border-radius: 0 0 6px 6px;
}

.media-caption div {
  display: grid;
  gap: 2px;
}

.media-caption span {
  color: var(--muted);
  font-size: 13px;
}

.transcript {
  margin-top: 14px;
  font-size: 13px;
}

.transcript summary {
  color: var(--purple);
  font-weight: 700;
  cursor: pointer;
}

.transcript ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.transcript li + li {
  margin-top: 6px;
}

.lifecycle-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
}

.lifecycle-row > div {
  padding-right: 34px;
}

.lifecycle-row > div + div {
  padding-left: 34px;
  border-left: 1px solid #c9c5cf;
}

.lifecycle-row strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--purple-ink);
  font-size: 17px;
}

.lifecycle-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 46px;
}

.video-item {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.video-item video,
.video-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
  border-bottom: 1px solid var(--line);
}

.video-item > div {
  padding: 22px 24px 25px;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.video-item h3 {
  margin: 0 0 8px;
  color: var(--purple-ink);
  font-size: 21px;
}

.video-item > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.evidence-section {
  color: #fff;
  background: var(--teal-dark);
}

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 70px;
  align-items: center;
}

.evidence-copy > p {
  margin: 22px 0 28px;
  color: #cce0df;
}

.report-figure {
  margin: 0;
}

.report-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 900;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
}

.report-figure figcaption {
  margin-top: 10px;
  color: #cce0df;
  font-size: 13px;
}

.site-footer {
  padding: 54px 0;
  color: #d8d4dc;
  background: #1e152b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 60px;
  align-items: start;
}

.footer-brand {
  color: #fff;
}

.footer-grid p {
  margin: 14px 0 0;
  font-size: 13px;
}

.footer-grid nav {
  display: grid;
  gap: 8px;
}

.footer-grid nav a {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

.footer-grid nav a:hover {
  text-decoration: underline;
}

.footer-disclaimer {
  color: #aaa2b2;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .primary-nav {
    display: none;
  }

  .nav-toggle {
    position: relative;
    display: block;
  }

  .nav-toggle summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    list-style: none;
    padding: 0 4px;
    color: #3f3f46;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
  }

  .nav-toggle summary::-webkit-details-marker {
    display: none;
  }

  .nav-toggle[open] summary {
    color: var(--purple);
  }

  .nav-toggle nav {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 30;
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(36, 19, 63, 0.16);
  }

  .nav-toggle nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    color: #3f3f46;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
  }

  .nav-toggle nav a:hover {
    color: var(--purple);
  }

  .intro-grid,
  .section-heading-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .stage-flow {
    grid-template-columns: repeat(3, 1fr);
  }

  .stage:nth-child(4) {
    border-left: 0;
  }

  .stage:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

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

@media (max-width: 720px) {
  .page-width {
    width: min(calc(100% - 32px), var(--page));
  }

  .site-header {
    min-height: 68px;
    padding: 10px 16px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
    border-width: 5px;
  }

  .header-actions .button-secondary {
    display: none;
  }

  .header-actions .button-primary {
    min-height: 44px;
    padding: 8px 11px;
    font-size: 13px;
  }

  .hero {
    height: clamp(430px, 68vh, 520px);
  }

  .hero-content {
    padding: 42px 0 34px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    margin: 18px 0 22px;
    font-size: 19px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .hero-note {
    margin-top: 20px;
  }

  .section {
    padding: 66px 0;
  }

  .section h2 {
    font-size: 35px;
  }

  .intro-copy p,
  .section-heading-row > p,
  .evidence-copy > p {
    font-size: 16px;
  }

  .scope-row,
  .lifecycle-row,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .scope-row article,
  .scope-row article + article,
  .lifecycle-row > div,
  .lifecycle-row > div + div {
    padding: 22px 0;
    border-left: 0;
  }

  .scope-row article + article,
  .lifecycle-row > div + div {
    border-top: 1px solid var(--line);
  }

  .stage-flow {
    grid-template-columns: 1fr;
  }

  .stage,
  .stage + .stage,
  .stage:nth-child(4) {
    min-height: 0;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .stage:first-child {
    border-top: 0;
  }

  .stage strong {
    margin-top: 10px;
  }

  .media-caption {
    align-items: flex-start;
  }

  .feature-media,
  .video-grid {
    margin-top: 34px;
  }

  .hub-fold {
    margin-top: 44px;
    padding-top: 36px;
  }

  .evidence-grid {
    gap: 42px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
