/* ============================================================
   IMPACT LOCALS / IMPACT NEPAL — dual-brand design system
   Layered on Bootstrap 5.3. Brand switch: body.brand-nepal / body.brand-locals
   ============================================================ */

:root {
  /* shared family tokens */
  --in-navy:      #14213d;
  --in-navy-800:  #1d2d52;
  --in-ink:       #1f2733;
  --in-slate:     #5b6472;
  --in-border:    #e6e9ef;
  --in-surface:   #f6f8fb;
  --in-gold:      #e9a13b;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

/* brand accent resolution */
body.brand-nepal {
  --brand:      #b81f2d;
  --brand-600:  #9b1824;
  --brand-100:  #fdf2f3;
  --brand-2:    #1e3a8a;
  --brand-on-navy: #e05563;
}
body.brand-locals {
  --brand:      #0e7c66;
  --brand-600:  #0a5f4e;
  --brand-100:  #e9f5f1;
  --brand-2:    #2f6fb2;
  --brand-on-navy: #3ddbb8;
}

body {
  font-family: var(--font-sans);
  color: var(--in-ink);
  overflow-x: hidden;
}

/* ---------------- typography ---------------- */
h1, h2, h3, h4, .display-hero { letter-spacing: -0.01em; }
.display-hero { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.section-title { font-size: 1.75rem; font-weight: 800; }
.eyebrow {
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .5rem;
}
.lead-muted { font-size: 1.1875rem; line-height: 1.6; color: var(--in-slate); max-width: 42rem; }
.quote-serif {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.375rem; line-height: 1.5;
  border-left: 3px solid var(--in-gold); padding-left: 1.25rem;
}
.stat-number { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1; color: var(--in-navy); font-variant-numeric: tabular-nums; }
.text-slate { color: var(--in-slate) !important; }
.text-brand { color: var(--brand) !important; }
.bg-surface { background: var(--in-surface) !important; }
.bg-navy { background: var(--in-navy) !important; }

/* ---------------- skip link ---------------- */
.skip-link {
  position: absolute; left: -9999px; z-index: 2000;
  background: var(--in-navy); color: #fff; padding: .5rem 1rem; border-radius: 0 0 .5rem 0;
}
.skip-link:focus { left: 0; top: 0; color: #fff; }

/* ---------------- network bar ---------------- */
.network-bar {
  background: var(--in-navy); color: rgba(255,255,255,.7);
  font-size: .8125rem; min-height: 38px;
}
.network-bar a { color: #fff; text-decoration: none; font-weight: 600; }
.network-bar a:hover, .network-bar a:focus { text-decoration: underline; }
.network-bar .net-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-on-navy); margin-right: .375rem; vertical-align: middle;
}

/* ---------------- navbar ---------------- */
.navbar-site {
  background: #fff; border-bottom: 1px solid var(--in-border);
}
.navbar-site .navbar-brand { font-weight: 800; letter-spacing: .02em; color: var(--in-navy); }
.navbar-site .brand-word { color: var(--brand); }
.navbar-site .nav-link { color: var(--in-ink); font-weight: 500; }
.navbar-site .nav-link:hover, .navbar-site .nav-link:focus { color: var(--brand); }
.navbar-site .nav-link.active { color: var(--brand); font-weight: 700; }
.navbar-site .dropdown-menu { border-color: var(--in-border); box-shadow: 0 .75rem 2rem rgba(20,33,61,.12); }
.navbar-site .dropdown-item i { color: var(--brand); width: 1.4rem; }
.navbar-site .dropdown-item:active { background: var(--brand); }

/* ---------------- buttons ---------------- */
.btn-brand {
  background: var(--brand); border-color: var(--brand); color: #fff;
  font-weight: 600; padding: .625rem 1.5rem; border-radius: .5rem;
}
.btn-brand:hover, .btn-brand:focus { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-outline-brand {
  border: 1.5px solid var(--brand); color: var(--brand);
  font-weight: 600; padding: .625rem 1.5rem; border-radius: .5rem;
}
.btn-outline-brand:hover, .btn-outline-brand:focus { background: var(--brand); color: #fff; }
.btn-light-outline {
  border: 1.5px solid rgba(255,255,255,.6); color: #fff;
  font-weight: 600; padding: .625rem 1.5rem; border-radius: .5rem;
}
.btn-light-outline:hover, .btn-light-outline:focus { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.link-arrow { color: var(--brand); font-weight: 600; text-decoration: none; }
.link-arrow i { transition: transform .18s ease; }
.link-arrow:hover { color: var(--brand-600); }
.link-arrow:hover i { transform: translateX(4px); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 2px; }

/* ---------------- sections ---------------- */
.section { padding: 4.5rem 0; }
@media (max-width: 767px) { .section { padding: 3rem 0; } }

/* ---------------- cards ---------------- */
.card-impact {
  border: 1px solid var(--in-border); border-radius: 1rem; background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  height: 100%;
}
.card-impact:hover {
  transform: translateY(-4px);
  box-shadow: 0 .75rem 2rem rgba(20,33,61,.12);
  border-color: var(--brand);
}
.icon-chip {
  width: 3.25rem; height: 3.25rem; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: .9rem; background: var(--brand-100); color: var(--brand); font-size: 1.5rem;
}
.icon-chip-lg { width: 4.5rem; height: 4.5rem; font-size: 2.1rem; border-radius: 1.1rem; }

/* colorful themed program card — drive with style="--c:#hex" on .card-color */
.card-color {
  position: relative; overflow: hidden;
  border-top: 4px solid var(--c, #b81f2d);
}
.card-color::before {
  /* soft tinted wash in the corner */
  content: ""; position: absolute; top: 0; right: 0; width: 8rem; height: 8rem;
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.card-color:hover {
  border-color: var(--c, #b81f2d);
  box-shadow: 0 .85rem 2.2rem color-mix(in srgb, var(--c) 26%, rgba(20,33,61,.14));
}
.card-color .icon-chip {
  color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 62%, #000 8%));
  box-shadow: 0 .35rem .9rem color-mix(in srgb, var(--c) 45%, transparent);
  transition: transform .2s ease;
}
.card-color:hover .icon-chip { transform: scale(1.08) rotate(-3deg); }
.card-color .card-title, .card-color h3 { transition: color .18s ease; }
.card-color:hover h3 { color: var(--c); }
.card-color .link-arrow { color: var(--c); }
.card-color .link-arrow:hover { color: color-mix(in srgb, var(--c) 75%, #000); }
/* pill badge tinted to the card color */
.badge-c {
  background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c);
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  padding: .32em .75em; border-radius: 999px; white-space: nowrap;
}

/* ---------------- badges ---------------- */
.badge-status-active    { background: #e9f5f1; color: #0a5f4e; }
.badge-status-completed { background: #f1f3f6; color: #5b6472; }
.badge-status-planned   { background: #eef4fd; color: #1e3a8a; }
.badge-status-active, .badge-status-completed, .badge-status-planned {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .35em .8em; border-radius: 999px;
}
.badge-sdg {
  background: var(--sdg, var(--in-navy)); color: #fff;
  font-size: .75rem; font-weight: 700; padding: .35em .8em; border-radius: .375rem;
}
.badge-tag {
  background: var(--brand-100); color: var(--brand);
  font-size: .75rem; font-weight: 700; padding: .35em .8em; border-radius: 999px;
}

/* ---------------- heroes ---------------- */
.hero-shell { position: relative; color: #fff; overflow: hidden; }
.hero-shell .container { position: relative; z-index: 3; }
.hero-shell .hero-lead { color: rgba(255,255,255,.9); max-width: 40rem; font-size: 1.1875rem; }
.hero-pad { padding: 6rem 0 7.5rem; }
@media (max-width: 767px) { .hero-pad { padding: 4rem 0 5.5rem; } }

.hero-nepal {
  background:
    radial-gradient(ellipse 60% 45% at 72% 18%, rgba(233,161,59,.28), transparent 70%),
    linear-gradient(160deg, #1d2d52 0%, #14213d 55%, #0e1730 100%);
}
/* real Himalaya photo behind the hero, dimmed so the diagram stays dominant */
.hero-photo::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../img/hero-himalaya.jpg") center 30% / cover no-repeat;
  opacity: .16;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 72%, transparent 100%);
}
.hero-locals {
  background:
    radial-gradient(circle at 78% 40%, rgba(61,219,184,.15), transparent 55%),
    linear-gradient(150deg, #14213d 0%, #0f2f3f 55%, #0e7c66 130%);
}
.hero-dots::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero-art { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-art svg { position: absolute; bottom: 0; left: 0; width: 100%; height: auto; display: block; }
.hero-globe { position: absolute; right: -6%; top: 50%; transform: translateY(-50%); width: 46%; min-width: 380px; z-index: 2; pointer-events: none; }
@media (max-width: 991px) { .hero-globe { opacity: .12; right: -20%; width: 80%; } }

/* masthead (interior pages, navy) */
.masthead {
  background: linear-gradient(160deg, #1d2d52 0%, #14213d 70%);
  color: #fff; padding: 3.5rem 0 2.5rem; position: relative; overflow: hidden;
}
.masthead .breadcrumb, .masthead .breadcrumb a { color: rgba(255,255,255,.6); font-size: .875rem; text-decoration: none; }
.masthead .breadcrumb a:hover { color: #fff; }
.masthead .breadcrumb-item.active { color: rgba(255,255,255,.85); }
.masthead .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }
.masthead-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; color: rgba(255,255,255,.85); font-size: .9375rem; }
.masthead-meta i { color: var(--brand-on-navy); margin-right: .35rem; }
.on-navy-muted { color: rgba(255,255,255,.65); }

/* curve divider out of hero into white */
.curve-divider { display: block; width: 100%; height: 60px; margin-top: -1px; }

/* ---------------- stats ---------------- */
.stat { text-align: center; }
.stat .stat-rule { width: 40px; height: 3px; background: var(--in-gold); margin: 0 auto .75rem; border-radius: 2px; }
.stat .stat-icon { font-size: 1.75rem; color: var(--brand); margin-bottom: .5rem; display: block; }
.stat .stat-label { font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--in-slate); margin-top: .5rem; }
.stats-card {
  background: #fff; border-radius: 1.25rem; padding: 2.5rem 1.5rem;
  box-shadow: 0 1rem 3rem rgba(20,33,61,.12);
  margin-top: -3.5rem; position: relative; z-index: 4;
}
.stat .stat-number small { font-size: 60%; font-weight: 800; }

/* stats on navy */
.bg-navy .stat-number { color: #fff; }
.bg-navy .stat-label { color: rgba(255,255,255,.65); }

/* ---------------- SDG strip ---------------- */
.sdg-strip { display: flex; flex-wrap: wrap; gap: .75rem; }
.sdg-tile {
  width: 72px; height: 72px; border-radius: 8px; background: var(--sdg);
  color: #fff; padding: .5rem; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .15s ease; text-decoration: none;
}
.sdg-tile:hover { transform: translateY(-2px); color: #fff; }
.sdg-tile .sdg-num { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.sdg-tile .sdg-name { font-size: .5625rem; font-weight: 700; text-transform: uppercase; line-height: 1.15; letter-spacing: .02em; }
.sdg-tile.sdg-light-text .sdg-name { text-shadow: 0 1px 2px rgba(0,0,0,.35); }
@media (max-width: 767px) { .sdg-tile { width: 56px; height: 56px; } .sdg-tile .sdg-name { display: none; } }

/* SDG detailed row */
.sdg-row { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--in-border); }
.sdg-row .sdg-tile { flex: 0 0 auto; width: 48px; height: 48px; }
.sdg-row .sdg-tile .sdg-num { font-size: 1.1rem; }

/* ---------------- timelines ---------------- */
/* horizontal roadmap */
.timeline-h { display: flex; gap: 1rem; position: relative; }
.timeline-h::before {
  content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--in-border);
}
.timeline-h .tl-item { flex: 1; position: relative; padding-top: 1.5rem; }
.timeline-h .tl-marker {
  position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--in-slate); z-index: 1;
}
.timeline-h .tl-item.done .tl-marker { background: var(--brand); border-color: var(--brand); }
.timeline-h .tl-item.current .tl-marker { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.timeline-h .tl-year { font-weight: 700; color: var(--in-navy); font-size: .9375rem; }
.timeline-h .tl-title { font-weight: 700; font-size: .9375rem; margin: .15rem 0; }
.timeline-h .tl-desc { font-size: .875rem; color: var(--in-slate); }
@media (max-width: 767px) {
  .timeline-h { flex-direction: column; gap: 1.5rem; }
  .timeline-h::before { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline-h .tl-item { padding-top: 0; padding-left: 2rem; }
}
/* on navy */
.bg-navy .timeline-h::before { background: rgba(255,255,255,.2); }
.bg-navy .timeline-h .tl-year { color: #fff; }
.bg-navy .timeline-h .tl-desc { color: rgba(255,255,255,.65); }
.bg-navy .timeline-h .tl-marker { background: var(--in-navy); border-color: rgba(255,255,255,.5); }
.bg-navy .timeline-h .tl-item.done .tl-marker,
.bg-navy .timeline-h .tl-item.current .tl-marker { background: var(--brand-on-navy); border-color: var(--brand-on-navy); }
.bg-navy .timeline-h .tl-item.current .tl-marker { box-shadow: 0 0 0 4px rgba(255,255,255,.15); }

/* vertical project timeline */
.timeline-v { list-style: none; margin: 0; padding: 0 0 0 1.75rem; border-left: 2px solid var(--in-border); }
.timeline-v li { position: relative; padding: 0 0 1.75rem 1rem; }
.timeline-v li:last-child { padding-bottom: 0; }
.timeline-v .tv-marker {
  position: absolute; left: calc(-1.75rem - 9px); top: .2rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--in-slate);
  display: flex; align-items: center; justify-content: center; font-size: .6rem; color: #fff;
}
.timeline-v li.done .tv-marker { background: var(--brand); border-color: var(--brand); }
.timeline-v li.current .tv-marker { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.timeline-v li.current .tv-body { background: var(--brand-100); border-radius: .75rem; padding: 1rem; }
.timeline-v .tv-when { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.timeline-v .tv-title { font-weight: 700; }
.timeline-v .tv-desc { font-size: .9375rem; color: var(--in-slate); }

/* ---------------- before/after bars ---------------- */
.ba-metric { margin-bottom: 1.5rem; }
.ba-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.ba-name { font-weight: 700; }
.ba-delta {
  background: #e9f5f1; color: #0a5f4e; font-size: .8125rem; font-weight: 700;
  padding: .2em .7em; border-radius: 999px;
}
.ba-bar { height: 12px; border-radius: 6px; background: var(--in-surface); overflow: hidden; margin-bottom: .3rem; }
.ba-bar + .ba-label { margin-bottom: .5rem; }
.ba-fill { height: 100%; border-radius: 6px; }
.ba-fill.before { background: #aab2bd; }
.ba-fill.after { background: linear-gradient(90deg, var(--brand), var(--brand-on-navy)); }
.ba-label { font-size: .8125rem; color: var(--in-slate); }
.ba-label strong { color: var(--in-navy); }

/* ---------------- budget bars ---------------- */
.budget-bar { height: 10px; border-radius: 5px; background: var(--brand-100); overflow: hidden; min-width: 120px; }
.budget-bar .bf { height: 100%; background: var(--brand); border-radius: 5px; }
.budget-tiles .tile {
  background: var(--in-surface); border-radius: .75rem; padding: 1rem 1.25rem; text-align: center;
}
.budget-tiles .tile .t-num { font-weight: 800; font-size: 1.35rem; color: var(--in-navy); font-variant-numeric: tabular-nums; }
.budget-tiles .tile .t-label { font-size: .8125rem; color: var(--in-slate); text-transform: uppercase; letter-spacing: .04em; }

/* ---------------- project tabs ---------------- */
.project-tabs-wrap { position: sticky; top: 0; z-index: 1020; margin-top: -1.75rem; }
.project-tabs {
  background: #fff; border: 1px solid var(--in-border); border-radius: 999px;
  padding: .375rem; box-shadow: 0 .5rem 1.5rem rgba(20,33,61,.10);
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: .125rem;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; --bs-nav-tabs-border-width: 0;
}
.project-tabs::-webkit-scrollbar { display: none; }
.project-tabs .nav-link {
  border: 0; border-radius: 999px; padding: .5rem 1.125rem; white-space: nowrap;
  font-size: .9375rem; font-weight: 600; color: var(--in-slate);
  scroll-snap-align: start; flex: 0 0 auto;
}
.project-tabs .nav-link i { margin-right: .35rem; }
.project-tabs .nav-link:hover { background: var(--brand-100); color: var(--brand); }
.project-tabs .nav-link.active { background: var(--brand); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
@media (max-width: 399px) { .project-tabs .nav-link i { display: none; } }

.tab-pane { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .tab-pane.show { animation: fadeUp .25s ease; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* context rail on project pages */
.rail-card { background: var(--in-surface); border-radius: 1rem; padding: 1.5rem; }
.rail-card h3 { font-size: 1rem; font-weight: 700; }
.rail-card ul { padding-left: 1.1rem; margin: 0; }
.rail-card li { margin-bottom: .4rem; font-size: .9375rem; }
@media (min-width: 992px) { .rail-sticky { position: sticky; top: 96px; } }

/* people avatars */
.avatar-initials {
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--brand-100); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; flex: 0 0 auto;
}

/* ---------------- steppers ---------------- */
.stepper { display: flex; gap: 1rem; }
.stepper .step { flex: 1; position: relative; }
.stepper .step-num {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: .6rem;
}
.stepper .step:not(:last-child)::after {
  content: ""; position: absolute; top: 1.1rem; left: 3rem; right: .5rem; height: 2px; background: var(--in-border);
}
.stepper .step-title { font-weight: 700; font-size: .9375rem; }
.stepper .step-desc { font-size: .875rem; color: var(--in-slate); }
@media (max-width: 767px) { .stepper { flex-direction: column; } .stepper .step:not(:last-child)::after { display: none; } }

/* ---------------- CTA band ---------------- */
.cta-band {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--brand) 0%, var(--in-navy) 100%);
  padding: 4rem 0;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.cta-band .container { position: relative; z-index: 1; }

/* ---------------- footer ---------------- */
.footer-site { background: var(--in-navy); color: rgba(255,255,255,.7); }
.footer-site h6 { color: #fff; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.footer-site a { color: rgba(255,255,255,.75); text-decoration: none; }
.footer-site a:hover, .footer-site a:focus { color: #fff; text-decoration: underline; }
.footer-site .footer-note { font-size: .8125rem; color: rgba(255,255,255,.5); }

/* ---------------- diagrams ---------------- */
.diagram-wrap { max-width: 720px; margin: 0 auto; }
.diagram-wrap svg { width: 100%; height: auto; display: block; }
/* the Nepal project map runs wider than the other diagrams */
.diagram-wrap.map-wrap { max-width: 900px; }
.map-wrap svg { filter: drop-shadow(0 14px 32px rgba(0,0,0,.30)); }
@media (prefers-reduced-motion: no-preference) {
  .flow-dash { stroke-dasharray: 4 8; animation: dashMove 2.5s linear infinite; }
  @keyframes dashMove { to { stroke-dashoffset: -24; } }
  .pulse-dot { animation: pulseDot 2s ease-out infinite; transform-origin: center; transform-box: fill-box; }
  @keyframes pulseDot { 0% { opacity: .6; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
}

/* demo footnote */
.demo-note { font-size: .8125rem; color: var(--in-slate); border-top: 1px dashed var(--in-border); padding-top: .75rem; }

/* contrast card ("parachute aid" vs "our way") */
.contrast-card { border-radius: 1rem; padding: 1.75rem; height: 100%; }
.contrast-card.muted { background: var(--in-surface); color: var(--in-slate); }
.contrast-card.ours { background: var(--brand-100); }
.contrast-card ul { padding-left: 1.2rem; margin: 0; }
.contrast-card li { margin-bottom: .6rem; }

/* ghost chapter card */
.ghost-card {
  border: 2px dashed rgba(255,255,255,.35); border-radius: 1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem; color: rgba(255,255,255,.75); height: 100%;
}

/* ---------------- hero hub diagram (focus-areas infographic) ---------------- */
.hero-hub {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 3rem 0 4rem;
}
.hero-hub .display-hero { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.hero-hub .hub-wrap { max-width: min(62vh, 96vw); margin-top: 2rem; }
.hero-hub .hub-wrap + .d-flex { margin-top: 2.25rem !important; }
@media (min-height: 900px) {
  .hero-hub .hub-wrap { max-width: min(68vh, 96vw); }
}
@media (max-width: 767px) {
  .hero-hub { min-height: 0; padding: 3rem 0 4rem; }
  .hero-hub .hub-wrap { margin-top: 1rem; }
}

.hub-wrap {
  position: relative;
  width: 100%; max-width: 540px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

/* center = the Nepal map itself (deliberately tilted, green like the flag of the hills) */
.hub-center-map {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  width: 60%; z-index: 4; text-decoration: none;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.45));
  transition: transform .25s ease, filter .25s ease;
}
.hub-center-map:hover, .hub-center-map:focus-visible {
  transform: translate(-50%, -50%) rotate(-4deg) scale(1.045);
  filter: drop-shadow(0 8px 26px rgba(0,0,0,.6));
}
.hub-center-map svg { width: 100%; height: auto; display: block; }

/* hover info cards on each segment */
.hub-node:hover, .hub-node:focus-within { z-index: 8; }
.hub-pop {
  position: absolute; left: 50%; width: 216px;
  background: rgba(29,45,82,.96);
  border: 1px solid rgba(255,255,255,.16);
  border-top: 3px solid var(--hub, #e05563);
  border-radius: .75rem; padding: .7rem .85rem;
  text-align: left; font-size: .75rem; line-height: 1.45;
  color: rgba(255,255,255,.85);
  box-shadow: 0 .9rem 2.2rem rgba(0,0,0,.5);
  opacity: 0; visibility: hidden;
  transform: translateX(var(--tx, -50%)) translateY(var(--ty, 6px));
  /* linger a moment on mouse-out so the cursor can travel into the card */
  transition: opacity .18s ease .25s, transform .18s ease .25s, visibility 0s linear .45s;
  z-index: 9;
}
/* invisible bridge across the gap between chip and card keeps hover alive */
.hub-pop::before {
  content: ""; position: absolute; left: 0; right: 0; height: 16px;
}
.pop-s .hub-pop::before { top: -16px; }
.pop-n .hub-pop::before { bottom: -16px; }
.hub-node:hover .hub-pop, .hub-node:focus-within .hub-pop {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(var(--tx, -50%)) translateY(0);
  transition-delay: 0s, 0s, 0s;
}
.hub-pop .hp-title {
  display: block; font-weight: 700; font-size: .8125rem; color: #fff; margin-bottom: .15rem;
}
.hub-pop .hp-more { display: block; margin-top: .3rem; font-weight: 700; color: var(--hub); }
/* placement */
.pop-s .hub-pop { top: calc(100% + 8px); }
.pop-n .hub-pop { bottom: calc(100% + 8px); --ty: -6px; }
.pop-edge-l .hub-pop { left: 0; --tx: 0; }
.pop-edge-r .hub-pop { left: auto; right: 0; --tx: 0; }
@media (hover: none) { .hub-pop { display: none; } }
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hub-lines line { stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: .35; }

.hub-node {
  position: absolute; transform: translate(-50%, -50%);
  width: 116px; text-align: center; text-decoration: none; z-index: 3;
}
.hub-chip {
  width: 72px; height: 72px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: #fff; background: var(--hub, #e05563);
  box-shadow: 0 0 0 4px rgba(255,255,255,.08), 0 .35rem 1rem rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hub-label {
  display: block; margin-top: .45rem;
  font-size: .82rem; font-weight: 600; line-height: 1.25;
  color: rgba(255,255,255,.85); transition: color .2s ease;
}
.hub-node:hover .hub-chip, .hub-node:focus-visible .hub-chip {
  transform: scale(1.16);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--hub) 40%, transparent), 0 .6rem 1.6rem rgba(0,0,0,.5);
}
.hub-node:hover .hub-label, .hub-node:focus-visible .hub-label { color: #fff; }

.hub-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 178px; height: 178px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; text-decoration: none; z-index: 4;
  background: radial-gradient(circle at 35% 30%, #1d2d52, #0e1730 75%);
  border: 3px solid #e05563;
  box-shadow: 0 0 60px rgba(184,31,45,.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.hub-center:hover, .hub-center:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 0 80px rgba(184,31,45,.55);
}
.hub-center .hub-map { width: 98px; margin-bottom: .3rem; }
.hub-center .hub-title { color: #fff; font-weight: 800; font-size: .875rem; letter-spacing: .06em; }
.hub-center .hub-sub { color: rgba(255,255,255,.65); font-size: .6875rem; letter-spacing: .04em; }
@media (prefers-reduced-motion: no-preference) {
  .hub-center::after {
    content: ""; position: absolute; inset: -3px; border-radius: 50%;
    border: 2px solid rgba(224,85,99,.6);
    animation: hubPulse 2.6s ease-out infinite;
  }
  @keyframes hubPulse {
    0%   { transform: scale(1);    opacity: .8; }
    100% { transform: scale(1.35); opacity: 0; }
  }
}
@media (max-width: 575px) {
  .hub-wrap { max-width: 340px; }
  .hub-chip { width: 48px; height: 48px; font-size: 1.2rem; }
  .hub-label { font-size: .64rem; }
  .hub-node { width: 76px; }
  .hub-center { width: 124px; height: 124px; }
  .hub-center .hub-map { width: 64px; }
  .hub-center .hub-title { font-size: .72rem; }
  .hub-center .hub-sub { font-size: .58rem; }
}
