/* Knowing Our Numbers v2. Colours sampled from the supplied artwork
   (coloured-bar-for-bottom.jpg, logos, report covers). */
:root {
  --red: #ec383c;
  --teal: #46969f;
  --teal-dark: #2d7780;     /* links and small teal text: 5:1 on white */
  --teal-band: #cfe3e6;
  --green: #88aa75;
  --purple: #7c77ad;
  --slate: #889eb3;
  --navy: #2e3d4f;
  --ink: #1f2328;
  --muted: #4d5560;
  --rule: #c9cdd1;
  --footer: #595b5a;        /* matches the footer logo JPG background */
  --white: #ffffff;
  --focus: #1b5fb4;

  --font-display: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;

  --max: 1240px;
  --max-text: 1040px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

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

a { color: var(--teal-dark); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }

h1, h2, h3 { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px;
  color: var(--white); background: var(--navy);
  font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container--text { max-width: calc(var(--max-text) + var(--gutter) * 2); }
.container--page { max-width: calc(1100px + var(--gutter) * 2); padding-bottom: 72px; }

.note { display: block; color: var(--muted); font-size: .875em; font-style: italic; }

/* ---------- Header ---------- */
.site-header { background: var(--white); position: relative; z-index: 10; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: calc(1400px + var(--gutter) * 2); margin: 0 auto;
  padding: 22px var(--gutter) 20px;
}
.site-logo { flex: 0 0 auto; display: block; }
.site-logo img { width: clamp(150px, 16vw, 228px); }

.site-header__menus { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }

.lang-switch { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: .9375rem; }
.lang-switch a { color: var(--ink); text-decoration: none; padding: 2px 2px; }
.lang-switch a[aria-current] { font-weight: 700; }
.lang-switch a:hover { color: var(--teal-dark); text-decoration: underline; }

.site-nav ul { display: flex; gap: clamp(18px, 2.4vw, 34px); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block; padding: 4px 0 8px;
  color: var(--ink); font-family: var(--font-display); font-size: 1.125rem; text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--teal-dark); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--navy); }

.nav-toggle { display: none; }

@media (max-width: 767px) {
  .site-header__inner { padding-top: 14px; padding-bottom: 14px; }
  .site-header__menus { flex-direction: row; align-items: center; gap: 14px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 8px 12px;
    color: var(--ink); background: transparent;
    border: 1px solid var(--rule); border-radius: 4px;
    font: 500 .9375rem var(--font-display); cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s ease;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-top: 1px solid var(--rule); box-shadow: 0 8px 16px rgba(0,0,0,.08);
  }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid #eceef0; }
  .site-nav a[aria-current="page"] { border-bottom-color: #eceef0; font-weight: 700; box-shadow: inset 3px 0 0 var(--navy); padding-left: 12px; }
}

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); background: var(--red); }
.hero__text {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(40px, 6vw, 96px) clamp(24px, 5.5vw, 88px);
  color: var(--white);
}
.hero h1 {
  max-width: 15em;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.875rem, 3.3vw, 3.25rem); line-height: 1.32; letter-spacing: -.005em;
}
.hero h1::after { content: ""; display: block; width: min(250px, 45%); height: 3px; margin-top: clamp(24px, 3vw, 40px); background: var(--white); }
.hero p { max-width: 32em; margin: clamp(22px, 2.6vw, 36px) 0 0; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.5; }
.hero__image { min-height: 100%; }
.hero__image img { width: 100%; height: 100%; max-height: 760px; object-fit: cover; object-position: 40% 30%; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__image { order: -1; }
  .hero__image img { aspect-ratio: 16 / 10; max-height: none; }
}

/* ---------- Video ---------- */
.video { padding: clamp(36px, 4vw, 48px) var(--gutter) 0; }
.video__frame { position: relative; max-width: 800px; margin: 0 auto; aspect-ratio: 16 / 9; background: #f1f3f4; }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Intro ---------- */
.intro { padding: clamp(32px, 3.5vw, 44px) 0 clamp(48px, 5vw, 64px); }
.intro--no-video { padding-top: clamp(48px, 5vw, 72px); }
.intro__title {
  margin-bottom: 24px;
  color: var(--navy); font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2.125rem); line-height: 1.3;
}
.intro p { margin: 0 0 1em; }
.intro p:last-child { margin-bottom: 0; }

/* ---------- Report tiles ---------- */
.reports-band { padding: clamp(28px, 3vw, 40px) 0 clamp(36px, 4vw, 56px); background: var(--teal-band); }
.report-tiles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 40px);
  margin: 0 auto; padding: 0; list-style: none; max-width: 1340px;
}
.report-tile { position: relative; padding-bottom: 24px; }
.report-tile__image { display: block; }
.report-tile__image img { width: 100%; aspect-ratio: 418 / 437; object-fit: cover; transition: filter .2s ease; }
.report-tile:hover .report-tile__image img { filter: brightness(1.04) saturate(1.05); }
.report-tile__caption {
  position: relative; z-index: 1;
  width: 84%; margin: -48px 0 0 8%;
  padding: 16px 18px 18px;
  background: var(--white); text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.report-tile__caption h3 { font-family: var(--font-body); font-weight: 500; font-size: 1.0625rem; line-height: 1.4; color: var(--ink); }
.report-tile__caption .note { margin-top: 2px; }
.report-tile__caption a { display: inline-block; margin-top: 10px; color: var(--ink); font-size: 1rem; }
.report-tile__caption a:hover { color: var(--teal-dark); }

@media (max-width: 800px) {
  .report-tiles { grid-template-columns: minmax(0, 420px); justify-content: center; }
}

/* ---------- Quote band ---------- */
.quote-band { padding: clamp(40px, 5vw, 72px) 0; background: var(--teal); color: var(--white); }
.quote-band p { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1875rem, 1.9vw, 1.625rem); line-height: 1.45; }

/* ---------- Regional reports ---------- */
.regional { padding: clamp(40px, 4.5vw, 64px) 0 clamp(40px, 4.5vw, 56px); }
.section-title, .page-title {
  color: var(--teal); font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.25;
}
.regional__hint { max-width: 36em; margin: 10px 0 24px; color: var(--ink); }
.regional__layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(24px, 4vw, 56px); align-items: start; }

.map-frame {
  position: relative; overflow: hidden;
  background: var(--white);
  touch-action: pan-y;
}
.map-frame:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.map-frame.is-zoomed { cursor: grab; touch-action: none; background: #f6f9f9; }
.map-frame.is-panning { cursor: grabbing; user-select: none; }
.report-map { display: block; width: 100%; height: auto; max-height: 780px; }
.report-map .area { cursor: pointer; }
.report-map .area path {
  stroke: rgba(255,255,255,.55); stroke-width: .8; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: filter .15s ease;
}
.report-map .area.is-preview path { filter: brightness(.86) saturate(1.1); }
.report-map .area.is-selected path { filter: brightness(.7) saturate(1.2); }
.report-map .area--none.is-preview path { filter: brightness(.95); }
.report-map .area--none.is-selected path { filter: brightness(.88); }
.report-map .area.is-preview, .report-map .area.is-selected {
  filter: drop-shadow(0 0 .6px var(--navy)) drop-shadow(0 0 .6px var(--navy)) drop-shadow(0 0 .6px var(--navy));
}
.report-map.has-selection .area:not(.is-selected):not(.is-preview) { opacity: .78; }

.map-toolbar {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,.94); border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.map-control {
  display: inline-grid; place-items: center;
  min-width: 40px; min-height: 40px; padding: 8px;
  color: var(--ink); background: var(--white);
  border: 1px solid #9aa3aa; border-radius: 3px;
  font: 500 .875rem var(--font-body); cursor: pointer;
}
.map-control--text { padding: 8px 12px; }
.map-control:hover:not(:disabled) { border-color: var(--navy); background: #eef5f6; }
.map-control:disabled { color: #8b949b; background: #eef0f1; border-color: #cfd4d8; cursor: not-allowed; }
.map-control__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-zoom-level { min-width: 48px; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; text-align: center; }

.report-panel label { display: block; margin-bottom: 8px; font-weight: 500; }
.report-panel select {
  width: 100%; min-height: 48px; padding: 10px 40px 10px 14px;
  color: var(--ink); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e3d4f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
  border: 1px solid #8c959c; border-radius: 4px;
  font: 1rem var(--font-body);
  appearance: none; text-overflow: ellipsis;
}
.report-panel select:hover { border-color: var(--navy); }

.report-card {
  min-height: 150px; margin-top: 20px; padding: 22px 22px 24px;
  background: var(--teal-band); border-left: 5px solid var(--teal);
}
.report-card__empty { margin: 0; color: var(--muted); }
.report-card__name { margin: 0 0 6px; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.4; color: var(--navy); }
.report-card .note { margin-bottom: 4px; }
.report-card__link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 10px 16px; min-height: 44px;
  color: var(--white); background: var(--teal-dark); border-radius: 3px;
  font-weight: 500; text-decoration: none;
}
.report-card__link:hover { color: var(--white); background: var(--navy); }
.report-card__link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.report-card--none { border-left-color: #a9b2b6; background: #eef0f1; }

.map-pan-hint { margin: 16px 0 0; color: var(--muted); font-size: .875rem; }

.report-list h3 { margin-bottom: 12px; font-family: var(--font-display); font-size: 1.125rem; color: var(--navy); }
.report-list ul { margin: 0; padding: 0 0 0 1.1em; }
.report-list li { margin-bottom: 8px; }
/* Once map.js runs, the select and card replace the full list. */
.regional.is-enhanced .report-list { display: none; }

@media (max-width: 900px) {
  .regional__layout { grid-template-columns: 1fr; }
  .report-panel { order: -1; }
  .report-card { min-height: 0; }
}

/* ---------- Partner ---------- */
.partner { padding: 0 0 clamp(40px, 5vw, 64px); }
.partner__inner { padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--rule); max-width: 1180px; margin: 0 auto; }
.partner h2 { margin: 0 0 16px clamp(0px, 4vw, 56px); font-family: var(--font-body); font-weight: 500; font-size: 1.125rem; }
.partner__body { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding-left: clamp(0px, 4vw, 56px); }
.partner__logo img { width: 100%; max-width: 260px; }
.partner__body p { max-width: 40em; margin: 0; font-size: .9375rem; }
@media (max-width: 600px) {
  .partner__body { grid-template-columns: 1fr; }
  .partner__logo img { max-width: 200px; }
}

/* ---------- Inner pages ---------- */
.banner { border-bottom: 8px solid var(--red); background: #ddd; }
.banner img { width: 100%; height: clamp(150px, 22vw, 337px); object-fit: cover; }

.page-title { margin: clamp(32px, 4vw, 48px) 0 24px; }

.feature-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(24px, 5vw, 64px);
  margin: 0 0 40px; padding: 28px clamp(0px, 3vw, 40px) 24px; list-style: none;
  border-top: 3px solid var(--green); border-bottom: 3px solid var(--green);
}
.feature { text-align: center; }
.feature__image { display: block; max-width: 420px; margin: 0 auto 16px; border: 1px solid #8f969b; }
.feature__image img { width: 100%; }
.feature__title { margin: 0; font-weight: 700; }

.resource-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 64px);
  margin: 0; padding: 0; list-style: none;
}
.resource-card { display: flex; flex-direction: column; align-items: center; padding: 28px 0 36px; text-align: center; }
.resource-grid > .resource-card:nth-child(n+3) { border-top: 1px solid var(--rule); }
.resource-card__title { max-width: 26em; margin-bottom: 18px; font-family: var(--font-body); font-weight: 700; font-size: 1.0625rem; line-height: 1.4; }
.resource-card__title a { color: var(--ink); text-decoration: none; }
.resource-card__title a:hover { color: var(--teal-dark); text-decoration: underline; }
.resource-card__title .note { font-weight: 400; }
.resource-card__image { display: block; width: min(220px, 70%); margin-top: auto; border: 1px solid #b7bdc1; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.resource-card__image img { width: 100%; }

.link-list { margin: 24px 0 0; padding: 0; list-style: none; }
.link-list li { margin-bottom: 14px; }
.link-list .strong { font-weight: 700; }

@media (max-width: 640px) {
  .feature-row, .resource-grid { grid-template-columns: 1fr; }
  .resource-grid > .resource-card:nth-child(n+2) { border-top: 1px solid var(--rule); }
}

.contact-intro { margin: 0 0 8px; }
.rule { margin: 32px 0 40px; border: 0; border-top: 1px solid var(--rule); }
.people {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px clamp(20px, 4vw, 56px);
  margin: 0; padding: 0; list-style: none;
}
.person { display: flex; flex-direction: column; align-items: center; text-align: center; }
.person__name { font-family: var(--font-body); font-weight: 700; font-size: 1.0625rem; }
.person__role { margin: 2px 0 0; }
.person__email { margin-top: 2px; font-size: .9375rem; overflow-wrap: anywhere; }
.person__photo { width: 100%; max-width: 250px; margin-top: 12px; }
@media (max-width: 860px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .people { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: var(--white); }
.site-footer__inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 40px;
  max-width: calc(1400px + var(--gutter) * 2); margin: 0 auto;
  padding: 28px var(--gutter) 24px;
}
.site-footer__brand img { width: clamp(170px, 16vw, 230px); }
.site-footer__copy { margin: 14px 0 0; font-size: .8125rem; }
.social ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--white); border: 1px solid rgba(255,255,255,.45); border-radius: 50%;
  transition: background-color .15s ease, color .15s ease;
}
.social a:hover { color: var(--footer); background: var(--white); }
.social svg { width: 20px; height: 20px; }
.colour-bar { display: grid; grid-template-columns: repeat(5, 1fr); height: 18px; }
.colour-bar span:nth-child(1) { background: var(--green); }
.colour-bar span:nth-child(2) { background: var(--purple); }
.colour-bar span:nth-child(3) { background: var(--slate); }
.colour-bar span:nth-child(4) { background: var(--red); }
.colour-bar span:nth-child(5) { background: var(--teal); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
