/* ============================================================
   Compassionate Humanity — comphumanity.org.uk
   Palette drawn from the charity's logo: deep petrol navy,
   heart teal, leaf green. Headings: Plus Jakarta Sans.
   Body: Nunito Sans.
   ============================================================ */

:root {
  --navy: #16425b;
  --navy-deep: #0e2f43;
  --teal: #2e8ca0;
  --teal-deep: #206e80;
  --green: #69a33f;
  --green-deep: #4f7e2d;
  --paper: #ffffff;
  --mist: #eef5f3;
  --ink: #22333d;
  --muted: #55696f;
  --line: #d8e4e1;
  --radius-leaf: 22px 22px 22px 5px;
  --shadow: 0 10px 30px rgba(14, 47, 67, 0.10);
  --font-display: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.22rem; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 0.9em;
}

.lead { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.72em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); color: #fff; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }

.btn-ghost { border-color: #fff; color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img { width: 44px; height: 44px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
  line-height: 1.1;
  color: var(--navy);
}

.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--navy);
}

.nav-toggle svg { display: block; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 3px solid transparent;
}

.nav-list a:not(.btn):hover { color: var(--teal-deep); }

.nav-list a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--green);
}

.nav-list .btn { padding: 0.5em 1.2em; font-size: 0.95rem; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .site-nav .nav-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 20px 20px;
  }

  .site-nav.open .nav-list { display: flex; }

  .nav-list li { border-top: 1px solid var(--line); }
  .nav-list li:first-child { border-top: 0; }
  .nav-list a:not(.btn) { display: block; padding: 14px 4px; border-bottom: 0; }
  .nav-list a[aria-current="page"] { color: var(--green-deep); }
  .nav-list .btn { display: block; text-align: center; margin-top: 12px; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding-block: clamp(70px, 12vw, 130px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, rgba(9, 33, 48, 0.94) 0%, rgba(9, 33, 48, 0.82) 45%, rgba(14, 47, 67, 0.45) 100%);
}

.hero .wrap, .page-hero .wrap { position: relative; z-index: 1; }

.hero .eyebrow { color: #b9e08e; }

.hero h1 { color: #fff; max-width: 17ch; }

.hero p {
  max-width: 56ch;
  font-size: 1.15rem;
  color: #e4efee;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* page hero (inner pages) */

.page-hero {
  position: relative;
  isolation: isolate;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding-block: clamp(48px, 8vw, 84px);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, rgba(9, 33, 48, 0.94) 0%, rgba(9, 33, 48, 0.84) 45%, rgba(14, 47, 67, 0.52) 100%);
}

.page-hero h1 { color: #fff; }
.page-hero p { color: #e4efee; max-width: 60ch; font-size: 1.12rem; }
.page-hero .eyebrow { color: #b9e08e; }

/* ---------- sections ---------- */

.section { padding-block: clamp(52px, 8vw, 84px); }
.section-mist { background: var(--mist); }
.section-head { max-width: 70ch; margin-bottom: 36px; }

/* ---------- cards & grids ---------- */

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  min-width: 0;
}

.card h3 { margin-top: 0.4em; }
.card p { color: var(--muted); font-size: 1rem; }

.icon-chip {
  width: 46px;
  height: 46px;
  border-radius: 14px 14px 14px 3px;
  display: grid;
  place-items: center;
  background: var(--mist);
  color: var(--teal-deep);
}

.icon-chip.green { background: #eef5e6; color: var(--green-deep); }
.icon-chip.navy { background: #e7eef3; color: var(--navy); }

.photo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.photo-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo-card img.img-contain { object-fit: contain; background: #f8f0e4; padding: 12px; }
.photo-card img.pos-top { object-position: top; }
.photo-card .photo-card-body { padding: 20px 22px 24px; }
.photo-card h3 { margin: 0 0 0.35em; }
.photo-card p { color: var(--muted); font-size: 0.99rem; margin: 0; }

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--mist);
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 10px;
}

/* ---------- split (text + image) ---------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.split > * { min-width: 0; }

.split img {
  border-radius: var(--radius-leaf);
  box-shadow: var(--shadow);
  width: 100%;
}

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- quote band ---------- */

.band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--teal-deep) 100%);
  color: #fff;
  padding-block: clamp(44px, 7vw, 64px);
}

.band blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  max-width: 26ch;
}

.band .band-note { color: #cfe3e2; margin-top: 12px; font-size: 1rem; }

/* ---------- partners ---------- */

.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

.partner-card {
  margin: 0;
  flex: 1 1 180px;
  max-width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  place-items: center;
  min-height: 120px;
}

.partner-card img { max-height: 84px; width: auto; object-fit: contain; }

.partner-card figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

/* ---------- CTA panel ---------- */

.cta-panel {
  background: var(--navy);
  border-radius: 24px 24px 24px 6px;
  color: #fff;
  padding: clamp(32px, 6vw, 56px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
}

.cta-panel h2 { color: #fff; margin-bottom: 0.3em; }
.cta-panel p { color: #d5e4e3; margin: 0; }
.cta-panel .hero-actions { margin-top: 0; justify-content: flex-end; }

@media (max-width: 820px) {
  .cta-panel { grid-template-columns: 1fr; }
  .cta-panel .hero-actions { justify-content: flex-start; }
}

/* ---------- lists ---------- */

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }

.check-list li {
  padding-left: 34px;
  position: relative;
  margin-bottom: 12px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 7px 7px 7px 2px;
  background: var(--green);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / 14px no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / 14px no-repeat;
}

/* ---------- gallery rows on projects page ---------- */

.project-cat { margin-bottom: clamp(40px, 7vw, 64px); }
.project-cat:last-child { margin-bottom: 0; }
.project-cat h2 { margin-bottom: 8px; }
.project-cat .cat-intro { color: var(--muted); max-width: 70ch; margin-bottom: 26px; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(28px, 5vw, 48px);
  align-items: start;
}

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }

.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .icon-chip { flex: 0 0 auto; width: 42px; height: 42px; }
.info-list strong { font-family: var(--font-display); color: var(--navy); display: block; }
.info-list span, .info-list a { color: var(--muted); word-break: break-word; }

form .field { margin-bottom: 16px; }

form label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 6px;
}

form input, form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

form input:focus, form textarea:focus { border-color: var(--teal); }

.form-note { font-size: 0.9rem; color: var(--muted); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: #cfdee4;
  margin-top: clamp(52px, 8vw, 84px);
  padding-block: 56px 28px;
  font-size: 0.98rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 36px;
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.site-footer a { color: #a9d4d2; }
.site-footer a:hover { color: #fff; }

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 46px; height: 46px; background: #fff; border-radius: 12px; padding: 4px; }

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.2;
}

.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #9cb4bd;
}

/* ---------- misc ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}

.skip-link:focus { left: 0; }

.notice {
  background: #eef5e6;
  border: 1px solid #cfe3b8;
  border-radius: 14px;
  padding: 14px 18px;
  color: var(--green-deep);
  font-weight: 600;
}

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