/* =========================================================
   SWACO — Somali Women and Children Community Development Group
   Design matched to the Crown Prosecution Service (cps.gov.uk)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

:root {
  --royal: #03295d;        /* logo navy — headings, links, nav */
  --royal-deep: #03295d;   /* logo navy — buttons */
  --royal-darker: #021c40;
  --ink: #1a1a1a;          /* body text */
  --lilac: #eceefb;        /* utility bar background */
  --white: #ffffff;
  --grey-1: #f3f2f4;
  --grey-2: #e7e6ea;
  --grey-3: #c9ccd4;
  --grey-4: #55606b;
  --strip: #2b2f38;        /* thin top strip */
  --c-blue: #3f9bd6;       /* card accent — blue */
  --c-yellow: #f4c430;     /* card accent — yellow */
  --c-green: #35a85a;      /* card accent — green */
  --gold: #f4c430;
  --focus: #ffdd00;
  --font-head: 'Figtree', Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Figtree', Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3, h4 { font-family: var(--font-head); }

a { color: var(--royal); }
a:hover { color: var(--royal-deep); }
a:focus {
  outline: 3px solid transparent;
  color: var(--ink);
  background-color: var(--focus);
  box-shadow: 0 -2px var(--focus), 0 4px var(--ink);
  text-decoration: none;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--focus); color: var(--ink); padding: 10px 15px; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---------- Utility bar (search + pill buttons) ---------- */
.utility { background: var(--lilac); }
.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  flex-wrap: wrap;
}
.search { position: relative; flex: 1 1 420px; max-width: 540px; }
.search input {
  width: 100%;
  border: 2px solid var(--royal);
  border-radius: 999px;
  padding: 13px 52px 13px 22px;
  font-size: 17px;
  font-family: var(--font-body);
  background: #fff;
  color: var(--ink);
}
.search input::placeholder { color: #6b7280; }
.search input:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.search button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: var(--royal);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.search button:hover { color: var(--royal-deep); }
.search button svg { width: 22px; height: 22px; }

.utility-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--royal-deep); color: #fff; text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: 17px;
  padding: 13px 22px; border-radius: 4px;
}
.pill-btn:hover { background: var(--royal-darker); color: #fff; }
.pill-btn:focus { color: var(--ink); }

/* ---------- Main header (logo + horizontal nav) ---------- */
.site-header {
  background: #fff; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.header-main {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; padding: 22px 0; flex-wrap: wrap;
}
.brand-lockup { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand-lockup img { height: 62px; width: auto; max-width: 100%; }

.mainnav { display: flex; align-items: center; }
.nav-toggle {
  display: none; background: transparent; border: 0; color: var(--royal);
  padding: 6px; cursor: pointer; border-radius: 4px; line-height: 0;
}
.nav-toggle svg { display: block; }
.mainnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 34px; flex-wrap: wrap;
}
.mainnav a {
  color: var(--royal); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 0;
}
.mainnav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mainnav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.mainnav a:focus { color: var(--ink); }

/* ---------- Hero (CPS style) ---------- */
.hero-cps { background: #fff; padding: 56px 0 44px; }
.hero-cps h1 {
  color: var(--royal); font-weight: 600; letter-spacing: normal;
  font-size: 48px; line-height: 1.2; margin: 0 0 24px; max-width: none;
}
.hero-cps p { color: var(--ink); font-size: 18px; line-height: 1.5; max-width: 62ch; margin: 0 0 28px; }
.chevron-link {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--royal); font-family: var(--font-head); font-weight: 600; font-size: 18px;
  text-decoration: underline; text-underline-offset: 4px;
}
.chevron-link::after { content: "›"; font-size: 24px; line-height: 1; text-decoration: none; }
.chevron-link:hover { color: var(--royal-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--royal-deep); color: #fff;
  text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 17px;
  padding: 13px 22px; border: 0; border-radius: 4px; cursor: pointer;
}
.btn:hover { background: var(--royal-darker); color: #fff; }
.btn:focus { background: var(--focus); color: var(--ink); }
.btn.secondary { background: #fff; color: var(--royal-deep); box-shadow: inset 0 0 0 2px var(--royal-deep); }
.btn.secondary:hover { background: var(--grey-1); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 52px 0; }
.section-grey { background: var(--grey-1); }
.section-teal { background: var(--royal-deep); color: #fff; }
.section-teal a { color: #fff; }

h2 { font-size: 32px; line-height: 1.2; margin: 0 0 20px; font-weight: 600; color: var(--ink); }
h3 { font-size: 22px; line-height: 1.25; margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.lede { font-size: 18px; line-height: 1.5; color: var(--ink); max-width: 62ch; }
.section-teal .lede { color: rgba(255,255,255,.92); }

/* ---------- Card grid (coloured tops) ---------- */
.grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--grey-2); border-top: 8px solid var(--royal);
  padding: 26px 24px 28px; display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(16, 20, 43, .06);
}
.card.c-blue { border-top-color: var(--c-blue); }
.card.c-yellow { border-top-color: var(--c-yellow); }
.card.c-green { border-top-color: var(--c-green); }
/* Photo cards: uniform gold top bar */
.card.c-blue.card--media,
.card.c-yellow.card--media,
.card.c-green.card--media { border-top-color: #d8a116; }

/* Cards with a photo */
.card--media { padding: 0; }
.card-media { aspect-ratio: 3 / 2; background: var(--grey-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card--media .card-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card--media .card-body h3 { margin-top: 0; }
.card--media .card-body p { margin: 0; color: var(--grey-4); }
.card h3 { margin-top: 0; }
.card p { margin: 0 0 16px; color: var(--grey-4); }
.card .card-link {
  margin-top: auto; font-family: var(--font-head); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}
.card .card-link::after { content: " ›"; }

.icon {
  width: 46px; height: 46px; border-radius: 8px; background: var(--grey-1);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 24px;
}

/* ---------- Two column ---------- */
.cols { display: grid; gap: 44px; grid-template-columns: 1fr; }
@media (min-width: 820px) {
  .cols.split { grid-template-columns: 2fr 1fr; }
  .cols.even { grid-template-columns: 1fr 1fr; }
}

/* ---------- Stats ---------- */
.stats { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); text-align: center; }
.stat .num { font-family: var(--font-head); font-size: 44px; font-weight: 700; display: block; line-height: 1; color: var(--gold); }
.stat .lbl { display: block; margin-top: 8px; color: rgba(255,255,255,.92); }

/* ---------- Panel ---------- */
.panel { border-left: 8px solid var(--royal); background: var(--grey-1); padding: 22px 24px; }
.panel.contact { border-left-color: var(--gold); }

/* ---------- Definition lists ---------- */
.deflist { border-top: 1px solid var(--grey-3); margin: 0; }
.deflist > div { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--grey-3); }
@media (min-width: 700px) { .deflist > div { grid-template-columns: 260px 1fr; gap: 20px; } }
.deflist dt { font-weight: 700; margin: 0; }
.deflist dd { margin: 0; color: var(--grey-4); }

/* ---------- Content lists ---------- */
.content ul { padding-left: 22px; }
.content li { margin-bottom: 8px; }
.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list li {
  background: #fff; border: 1px solid var(--grey-3); padding: 8px 14px; border-radius: 20px;
  font-size: 16px; color: var(--royal); font-weight: 600; font-family: var(--font-head);
}

/* ---------- Page header ---------- */
.page-head { background: var(--grey-1); border-bottom: 1px solid var(--grey-2); }
.page-head .container { padding-top: 40px; padding-bottom: 40px; }
.page-head h1 { font-size: 40px; margin: 0 0 12px; font-weight: 600; color: var(--royal); letter-spacing: normal; }
.page-head p { margin: 0; color: var(--ink); font-size: 18px; line-height: 1.5; max-width: 62ch; }
.breadcrumb { font-size: 15px; margin-bottom: 14px; font-family: var(--font-head); }
.breadcrumb a { color: var(--royal-deep); }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--grey-2); border: 1px solid var(--grey-3); }
.gallery figcaption { font-size: 15px; color: var(--grey-4); margin-top: 6px; }
.ph {
  background: repeating-linear-gradient(45deg, var(--grey-2), var(--grey-2) 12px, var(--grey-1) 12px, var(--grey-1) 24px);
  display: flex; align-items: center; justify-content: center; color: var(--grey-4);
  font-size: 14px; text-align: center; padding: 10px; aspect-ratio: 4 / 3;
}

/* ---------- Forms ---------- */
.form-field { margin-bottom: 22px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; font-family: var(--font-head); }
.form-field label .req { color: #d4351c; margin-left: 2px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px; font-size: 17px; border: 2px solid var(--ink); border-radius: 0; font-family: inherit;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: 3px solid var(--focus); outline-offset: 0; }
.hint { color: var(--grey-4); font-size: 16px; margin: 0 0 6px; }

/* ---------- Footer ---------- */
.site-footer { background: #10142b; color: #cfd3e6; padding: 32px 0 22px; font-size: 16px; border-top: 6px solid var(--gold); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-bottom: 18px; }
.site-footer h4 { color: #fff; font-size: 17px; margin: 0 0 12px; font-family: var(--font-head); }
.footer-logo { height: 58px; width: auto; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-note { margin: 0 0 22px; color: #aeb2c9; font-size: 15px; max-width: 70ch; }
.footer-note a { color: #fff; }
.footer-bottom { border-top: 1px solid #2a2f4a; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Utilities ---------- */
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.center { text-align: center; } .muted { color: var(--grey-4); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header-main { position: relative; }
  .nav-toggle { display: block; }
  .mainnav { width: 100%; }
  .mainnav ul { display: none; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; margin-top: 12px; }
  .mainnav ul.open { display: flex; }
  .mainnav li { width: 100%; border-top: 1px solid var(--grey-2); }
  .mainnav a { padding: 12px 0; width: 100%; }
  .hero-cps h1 { font-size: 34px; }
  .page-head h1 { font-size: 32px; }
  .brand-lockup img { height: 58px; }
}
@media (max-width: 620px) {
  .container { padding: 0 30px; }
  .header-main { padding-top: 38px; }
  .brand-lockup img { height: 48px; }
  body { font-size: 16px; }
  .hero-cps h1 { font-size: 30px; }
  .hero-cps p { font-size: 16px; }
  .lede { font-size: 16px; }
  .form-field input, .form-field textarea, .form-field select { font-size: 16px; }
  h2 { font-size: 23px; }
  .site-footer { font-size: 14px; }
  .footer-bottom { font-size: 13px; }
  .footer-logo { height: 50px; }
}
