/* thriveaging.ca. Colours come from the THRIVE logo; every text pair is AA or better. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/atkinson-hyperlegible-next-latin-wght-normal.18b2a1a3.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/atkinson-hyperlegible-next-latin-ext-wght-normal.7dae0c6c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ocean: #0b5e8a;      /* logo blue: links, buttons (7.2:1 on white) */
  --tide: #0c2c47;       /* deep ground and headings (14.3:1) */
  --ink: #1b2b38;        /* body text */
  --muted: #4a6577;      /* secondary text (6.1:1 on white, 5.7:1 on mist) */
  --leaf: #5a9a2e;       /* logo green: graphics only */
  --leaf-ink: #3e7a1f;   /* green text (5.2:1) */
  --sun: #ca650c;        /* logo orange: graphics only */
  --sun-bright: #f28a2e; /* orange on the deep ground (5.8:1) */
  --leaf-bright: #8cc461;/* green on the deep ground (6.9:1) */
  --mist: #f1f6f8;       /* alternate section ground */
  --line: #d3e0e7;       /* hairlines only */
  --on-deep: #b9ccda;    /* secondary text on the deep ground (8.7:1) */
  --wrap: 72rem;
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--ocean); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { color: var(--tide); line-height: 1.1; margin: 0; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 760; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
p + p { margin-top: 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--tide); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); }
.top::after { /* the logo's three colours, as a thin band */
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--leaf) 0 33.3%, var(--sun) 33.3% 66.6%, var(--ocean) 66.6% 100%);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; min-height: 4.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ocean); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.04em; min-height: 44px; }
.brand img { width: 46px; }
.top nav ul { display: flex; flex-wrap: wrap; gap: 0 1.6rem; list-style: none; margin: 0; padding: 0; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 560; }
.top nav a:hover { color: var(--ocean); text-decoration: underline; }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; max-width: 13em; }
.lead { font-size: clamp(1.15rem, 1.7vw, 1.3rem); max-width: var(--measure); margin-top: 1.5rem; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; margin-top: 2rem; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.4rem; background: var(--ocean); color: #fff; text-decoration: none; font-weight: 700; border-radius: 999px; }
.btn:hover { background: var(--tide); }
.hero-mark { justify-self: center; width: min(100%, 26rem); }

/* Sections */
.sec { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sec.mist { background: var(--mist); }
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem 4rem; align-items: start; }
.split .body { max-width: var(--measure); }
.note { margin-top: 1.25rem; font-size: 1rem; color: var(--muted); }

/* Intrinsic capacity */
.ic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem 4rem; align-items: center; margin-top: 2.5rem; }
.ic-figure { max-width: 26rem; justify-self: center; width: 100%; }
.ic-figure .seg { fill: #d8e8f1; }
.ic-figure .seg-label { fill: var(--tide); font-size: 15px; font-weight: 700; }
.ic-figure .core { fill: var(--ocean); }
.ic-figure .core-label { fill: #fff; font-size: 17px; font-weight: 760; }
.domains { margin: 0; display: grid; gap: 1.1rem; }
.domains div { border-top: 1px solid var(--line); padding-top: 0.9rem; }
.domains dt { font-weight: 760; color: var(--tide); }
.domains dd { margin: 0; color: var(--muted); }

/* Phases: a true sequence, so numbered */
.phases { list-style: none; margin: 2.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; position: relative; }
.phases::before { content: ""; position: absolute; top: 1.75rem; left: 1.75rem; right: 1.75rem; height: 3px; background: var(--line); }
.phases li { position: relative; }
.phases .num { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 0 0 8px #fff; }
.phases li:nth-child(1) .num { background: var(--leaf-ink); }
.phases li:nth-child(2) .num { background: var(--ocean); }
.phases li:nth-child(3) .num { background: var(--sun); }
.phases .phase-n { display: block; font-size: 1rem; color: var(--muted); font-weight: 600; }
.phases h3 { font-size: 1.6rem; margin: 0.1rem 0 0.6rem; }
.phases p { max-width: 22rem; }
.practice { margin-top: 2.75rem; padding: 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: 14px; max-width: 48rem; }
.practice strong { color: var(--tide); }

/* Consortium: the one dark section */
.deep { background: var(--tide); color: #fff; }
.deep h2, .deep h3 { color: #fff; }
.deep .lead { color: var(--on-deep); }
.deep a { color: #fff; }
.map { margin: 2.5rem 0 0; }
.map svg { width: 100%; }
.map .land { fill: #1f4868; }
.map .member { fill: var(--leaf-bright); }
.map .pin circle { fill: var(--sun-bright); stroke: var(--tide); stroke-width: 2; }
.map .pin text { fill: #fff; font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--tide); stroke-width: 3px; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 1rem; font-size: 1rem; color: var(--on-deep); }
.legend span::before { content: ""; display: inline-block; width: 0.8rem; height: 0.8rem; margin-right: 0.5rem; vertical-align: -0.05rem; border-radius: 3px; background: var(--leaf-bright); }
.legend span.dot::before { border-radius: 50%; background: var(--sun-bright); }
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2.25rem 2.5rem; margin-top: 3rem; }
.countries h3 { font-size: 1.1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #2e5677; margin-bottom: 0.9rem; }
.countries ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.countries .id { display: block; font-weight: 800; color: var(--sun-bright); }
.countries .full { display: block; }
.countries .place { display: block; color: var(--on-deep); font-size: 1rem; }
.countries a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; }

/* Partners */
.partners { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 2.5rem 4rem; margin-top: 2.5rem; }
.partners h3 { margin-bottom: 1rem; }
.inst { list-style: none; margin: 0; padding: 0; }
.inst li { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.support { margin: 0; }
.support div { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.support dt { font-size: 1rem; color: var(--muted); }
.support dd { margin: 0; font-weight: 640; color: var(--tide); }

/* People and papers (shown once their lists have entries) */
.people { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.5rem 2rem; }
.people li { border-top: 1px solid var(--line); padding-top: 0.9rem; }
.people .who { display: block; font-weight: 760; color: var(--tide); }
.people .role, .people .where { display: block; color: var(--muted); font-size: 1rem; }
.pubs { list-style: none; margin: 2.5rem 0 0; padding: 0; max-width: 52rem; }
.pubs li { padding: 1rem 0; border-top: 1px solid var(--line); }
.pubs .meta { display: block; color: var(--muted); font-size: 1rem; }

/* Footer */
.foot { background: var(--mist); border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: 1rem; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.foot .brand { font-size: 1.2rem; }
.foot .brand img { width: 36px; }
.foot p + p { margin-top: 0.25rem; }

@media (max-width: 860px) {
  .hero-in, .split, .ic, .partners { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { order: -1; width: min(60%, 15rem); justify-self: start; }
  .phases { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .phases::before { top: 1.75rem; bottom: 1.75rem; left: 1.75rem; right: auto; width: 3px; height: auto; }
  .phases li { padding-left: 5rem; }
  .phases .num { position: absolute; left: 0; top: 0; }
}
@media (max-width: 640px) {
  .top { position: static; } /* a wrapped menu would hide a fifth of a phone screen */
  html { scroll-padding-top: 1rem; }
  .top-in { padding-top: 0.5rem; padding-bottom: 0.25rem; }
  .top nav ul { gap: 0 1.1rem; }
  .map .pin text { display: none; } /* too small to read: the list below names every pin */
}
