/* Centre for Whole of Society Resilience
   Four moons, one whole: four strands (study, deliver, shape, live with) that overprint where they meet. */

:root {
  --paper: #FFF9F1;
  --white: #FFFFFF;
  --ink: #231E3D;
  --ink-2: #3B3552;
  --dusk: #5B5470;
  --line: #E9DFD2;

  --blue: #7B9CFF;  --blue-t: #E4EAFF;  --blue-d: #3B4C99;
  --mint: #4FD1A5;  --mint-t: #DCF6EC;  --mint-d: #1F6B50;
  --sun: #FFC93C;   --sun-t: #FFF1CC;   --sun-d: #7A5A00;
  --peony: #FF7EB0; --peony-t: #FFE3EE; --peony-d: #9B2C5C;

  --display: "Figtree", system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", system-ui, sans-serif;

  --r-card: 28px;
  --r-big: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--blue-d); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--display); margin: 0; color: var(--ink); }
h1, .h1 { font-weight: 400; font-size: clamp(42px, 5.6vw, 76px); line-height: 1.0; letter-spacing: -0.035em; }
h2, .h2 { font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.06; letter-spacing: -0.03em; }
h3 { font-weight: 600; font-size: 21px; line-height: 1.25; letter-spacing: -0.005em; }
p { margin: 0; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.lede { font-size: 20px; line-height: 1.6; color: var(--ink-2); max-width: 600px; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; color: var(--dusk); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.link { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; min-height: 48px;
  font: 700 17px/1.2 var(--text);
  text-decoration: none; color: var(--ink);
  border-radius: 999px; border: 0; cursor: pointer;
  background: var(--blue-t);
  transition: background .15s, box-shadow .15s;
}
.btn:hover { color: var(--ink); background: #D4DEFF; }
.btn svg { width: 18px; height: 18px; }
.btn--outline { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); font-weight: 400; }
.btn--outline:hover { background: var(--white); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #352E57; color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Mark ---------- */
.mark { display: block; flex: none; }
.mark g { isolation: isolate; }
.mark path { mix-blend-mode: multiply; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__sub { font-size: 13px; color: var(--dusk); }
.brand__name { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) { padding: 12px; font-size: 16px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav a[aria-current="page"]:not(.btn) { font-weight: 700; }
.nav a[aria-current="page"]:not(.btn)::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--peony)); }
.nav .btn { margin-left: 8px; padding: 12px 20px; font-size: 16px; min-height: 44px; }
.nav-toggle { display: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--white); cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { position: absolute; left: 14px; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; }
.nav-toggle span { top: 23px; }
.nav-toggle span::before { left: 0; top: -6px; }
.nav-toggle span::after { left: 0; top: 6px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 16px; right: 16px; top: 76px; flex-direction: column; align-items: stretch; background: var(--white); border-radius: var(--r-card); padding: 12px; box-shadow: 0 12px 40px rgba(35, 30, 61, .12); }
  .nav-open .nav { display: flex; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Sections ---------- */
.section { padding: 104px 0 0; }
.section:last-child { padding-bottom: 104px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 40px; margin-bottom: 40px; }
.section-head p { max-width: 460px; }

/* ---------- Home hero ---------- */
.hero { padding: 40px 0 0; }
.hero__grid > * { min-width: 0; }
.hero__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 48px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 28px; }
.hero-photo { justify-self: center; width: 100%; max-width: 540px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 40px 40px 40px 280px; background: var(--mint-t); }
.hero-photo figcaption { font-size: 13px; color: var(--dusk); text-align: right; }
.hero-photo figcaption a { color: var(--dusk); }

.banner { margin-top: 72px; background: var(--sun-t); border-radius: 999px; padding: 20px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 17px; }
.banner a { font-weight: 700; padding: 10px 0; }
@media (max-width: 640px) { .banner { border-radius: var(--r-card); } }

/* ---------- Four groups ---------- */
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.group { border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 300px; }
.group h3 { font-weight: 500; font-size: 26px; letter-spacing: -0.01em; line-height: 1.15; }
.group p { font-size: 16px; color: var(--ink-2); }
.group__kind { font-size: 15px; font-weight: 700; }
.t-blue { background: var(--blue-t); } .t-mint { background: var(--mint-t); } .t-sun { background: var(--sun-t); } .t-peony { background: var(--peony-t); }

/* ---------- Purpose & pillars ---------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 56px; }
.split .stack p { font-size: 19px; color: var(--ink-2); }
.pillars { display: flex; flex-direction: column; gap: 14px; }
.pillar { background: var(--white); border-radius: var(--r-card); padding: 28px; display: flex; gap: 20px; align-items: flex-start; }
.pillar p { font-size: 16px; color: var(--ink-2); margin-top: 8px; }
.dot { width: 20px; height: 20px; border-radius: 50%; flex: none; margin-top: 4px; }
.dot--blue { background: var(--blue); } .dot--mint { background: var(--mint); } .dot--sun { background: var(--sun); } .dot--peony { background: var(--peony); }

.ruled { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); border-top: 2px solid var(--ink); }
.ruled > div { padding: 28px 28px 28px 0; display: flex; flex-direction: column; gap: 10px; }
.ruled p { font-size: 16px; color: var(--ink-2); }

/* ---------- Cards (news) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 48px 28px; }
.card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); }
.card:hover { color: var(--ink); }
.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.card__art { aspect-ratio: 4 / 3; border-radius: 28px 28px 28px 160px; position: relative; overflow: hidden; }
.card__art svg { position: absolute; right: -14%; bottom: -24%; width: 78%; height: auto; }
.card:nth-child(3n+2) .card__art { border-radius: 160px 28px 28px 28px; }
.card:nth-child(3n) .card__art { border-radius: 28px 160px 28px 28px; }
.card__meta { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card__meta .dot { width: 10px; height: 10px; margin: 0; }
.card__meta span:last-child { color: var(--dusk); }
.card h3 { font-weight: 500; font-size: 22px; letter-spacing: -0.01em; }
.card p { font-size: 16px; color: var(--ink-2); }

.feature { background: var(--sun-t); border-radius: var(--r-big); overflow: hidden; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: center; text-decoration: none; color: var(--ink); }
.feature:hover { color: var(--ink); }
.feature__body { padding: 48px; display: flex; flex-direction: column; gap: 18px; }
.feature__body h2 { font-size: clamp(32px, 3.4vw, 42px); }
.feature__art { position: relative; min-height: 320px; height: 100%; }
.feature__art svg { position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: 420px; height: 420px; }

/* ---------- Join band ---------- */
.join-band { position: relative; overflow: hidden; background: var(--peony-t); border-radius: var(--r-big); padding: 64px; }
.join-band > svg { position: absolute; right: -150px; top: -120px; width: 520px; height: 520px; }
.join-band__body { position: relative; display: flex; flex-direction: column; gap: 18px; max-width: 580px; }
.join-band__body p { font-size: 19px; color: var(--ink-2); }
@media (max-width: 640px) { .join-band { padding: 40px 28px; } .join-band > svg { opacity: .5; } }

/* ---------- Page hero ---------- */
.page-hero { padding: 48px 0 0; }
.page-hero .wrap { display: flex; flex-direction: column; gap: 18px; }
.page-hero .lede { max-width: 700px; }
.crumbs { font-size: 15px; color: var(--dusk); }
.crumbs a { color: var(--dusk); }

/* ---------- About ---------- */
.intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 48px; }
.intro .stack p { font-size: 19px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.chips__count { font-family: var(--display); font-size: 40px; letter-spacing: -0.03em; margin-right: 16px; }
.chips li { padding: 10px 18px; border-radius: 999px; font-size: 16px; }
.chips li:nth-child(4n+1) { background: var(--blue-t); } .chips li:nth-child(4n+2) { background: var(--mint-t); }
.chips li:nth-child(4n+3) { background: var(--sun-t); } .chips li:nth-child(4n+4) { background: var(--peony-t); }

.founders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 48px 28px; }
.person { display: flex; flex-direction: column; gap: 16px; }
/* a crescent of colour glued to the right edge: a disc of the same size, offset behind the photo */
.person__photo { width: 238px; height: 220px; }
.person__photo img { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; box-shadow: 18px 0 0 var(--ring, var(--blue)); }
.person h3 { font-weight: 500; font-size: 25px; letter-spacing: -0.01em; }
.role { font-size: 16px; color: var(--dusk); }
.bio p { font-size: 16px; color: var(--ink-2); }
.bio p + p { margin-top: 12px; }

.committee { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.member { background: var(--white); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.member__head { display: flex; gap: 16px; align-items: center; }
.member__head img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 8px 0 0 var(--ring, var(--blue)); margin-right: 8px; }
.member .bio p { font-size: 15px; }

.slim-band { background: var(--mint-t); border-radius: 999px; padding: 32px 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.slim-band h2 { font-size: clamp(28px, 3vw, 34px); }
@media (max-width: 640px) { .slim-band { border-radius: var(--r-card); padding: 28px; } }

/* ---------- Article ---------- */
.article-hero { padding: 48px 0 0; }
.article-hero .wrap { display: flex; flex-direction: column; gap: 20px; max-width: 900px; }
.article-hero h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.05; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 16px; color: var(--dusk); align-items: center; }
.article-meta .dot { width: 10px; height: 10px; margin: 0; }
.article { max-width: 900px; margin: 0 auto; padding: 56px 24px 0; }
.prose { max-width: 720px; font-size: 19px; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 20px; }
.prose h2 { font-size: 32px; margin-top: 48px; color: var(--ink); }
.prose strong { color: var(--ink); }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose .first { font-size: 22px; color: var(--ink); }
.prose blockquote { margin: 32px 0; padding: 28px 32px; background: var(--peony-t); border-radius: var(--r-card); font-family: var(--display); font-size: 24px; line-height: 1.35; color: var(--ink); }
.callout { background: var(--white); border-radius: var(--r-card); padding: 24px 28px; }
.callout p + p { margin-top: 6px; }
.schedule { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 8px; }
.schedule li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; background: var(--white); border-radius: 18px; padding: 14px 20px; margin: 0 !important; }
.schedule b { color: var(--ink); }
@media (max-width: 560px) { .schedule li { grid-template-columns: 1fr; gap: 2px; } }
.connect-list { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 10px; }
.connect-list li { display: flex; align-items: center; gap: 14px; margin: 0 !important; font-weight: 700; color: var(--ink); }
.connect-list i { flex: 1; max-width: 120px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--mint), var(--sun), var(--peony)); border-radius: 2px; }
.post-nav { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 56px !important; padding-top: 24px; border-top: 2px solid var(--ink); font-size: 16px; }

/* ---------- Join page ---------- */
.join-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.charter { flex: 999 1 560px; min-width: 0; background: var(--white); border-radius: var(--r-big); padding: 44px; display: flex; flex-direction: column; gap: 22px; }
.charter h2 { font-size: 34px; letter-spacing: -0.02em; }
.charter p, .charter li { font-size: 17px; color: var(--ink-2); }
.charter ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.aside { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.aside__card { position: relative; overflow: hidden; border-radius: var(--r-big); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.aside__card > svg { position: absolute; right: -70px; top: -70px; width: 200px; height: 200px; mix-blend-mode: multiply; }
.aside__card h2 { position: relative; font-size: 28px; letter-spacing: -0.02em; }
.aside__card a, .aside__card p { position: relative; font-size: 16px; }
.aside__card a:not(.btn) { padding: 4px 0; }
@media (max-width: 640px) { .charter { padding: 28px; } }

/* ---------- Governance ---------- */
.toc-layout { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.toc { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; }
.toc p { font-size: 15px; font-weight: 700; color: var(--dusk); padding-bottom: 6px; }
.toc a { padding: 9px 0; font-size: 17px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.toc .dot { width: 10px; height: 10px; margin: 0; }
.gov { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.gov > h2 { margin-top: 64px; }
.gov > h2:first-child { margin-top: 0; }
.gov-block { background: var(--white); border-radius: var(--r-card); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.gov-block h3 { font-size: 22px; display: flex; align-items: center; gap: 12px; }
.gov-block ol { margin: 0; padding-left: 22px; font-size: 17px; line-height: 1.7; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.rules { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rules li { padding: 14px 22px; border-radius: 999px; font-size: 17px; font-weight: 700; }
.rules li:nth-child(1) { background: var(--blue-t); } .rules li:nth-child(2) { background: var(--mint-t); }
.rules li:nth-child(3) { background: var(--sun-t); } .rules li:nth-child(4) { background: var(--peony-t); }
.rules li:nth-child(5) { background: var(--white); box-shadow: inset 0 0 0 2px var(--ink); }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--white); border-radius: var(--r-card); }
.faq details:nth-child(4n+1)[open] { background: var(--blue-t); } .faq details:nth-child(4n+2)[open] { background: var(--mint-t); }
.faq details:nth-child(4n+3)[open] { background: var(--sun-t); } .faq details:nth-child(4n+4)[open] { background: var(--peony-t); }
.faq summary { list-style: none; cursor: pointer; min-height: 64px; padding: 18px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 18px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23231E3D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(180deg); background-color: var(--white); }
.faq details p { padding: 0 26px 24px; font-size: 17px; line-height: 1.7; color: var(--ink-2); max-width: 760px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 2px solid var(--ink); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; padding: 48px 0 36px; }
.footer__brand { display: flex; flex-direction: column; gap: 14px; max-width: 320px; }
.footer__brand p { font-size: 16px; color: var(--ink-2); }
.footer__cols { display: flex; flex-wrap: wrap; gap: 48px; }
.site-footer h4 { font-family: var(--text); font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-footer ul a { font-size: 16px; text-decoration: none; display: inline-block; padding: 4px 0; }
.site-footer ul a:hover { text-decoration: underline; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 0 40px; border-top: 1px solid var(--line); font-size: 15px; color: var(--dusk); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
