/* Livingstone Explorer Initiative: public site
   Palette: deep navy ink, royal blue accent, pale sky mist */

:root {
  --ink: #0d2748;
  --ink-2: #153a68;
  --teal: #1769d1;
  --accent: #1565e0;
  --accent-deep: #0f4fb4;
  --accent-soft: #dce9fc;
  --accent-light: #8fbcff;
  --mist: #eef4fc;
  --white: #fff;
  --text: #14213a;
  --muted: #52627c;
  --line: #d3deee;
  --radius: 4px;
  --wrap: 1140px;
  --head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cta-band :focus-visible, .site-footer :focus-visible, .topbar :focus-visible { outline-color: var(--white); }

h1, h2, h3 { font-family: var(--head); line-height: 1.12; color: var(--ink); margin: 0 0 .6em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3, .h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1.1em; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 720px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--white); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  padding: .95rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-deep); color: var(--white); }
.cta-band .btn-primary { background: var(--white); color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--accent-soft); color: var(--ink); }
.btn-solid { background: var(--ink); color: var(--white); }
.btn-solid:hover { background: var(--teal); color: var(--white); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--ink); }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--white); }
.more { font-weight: 600; color: var(--teal); }
.more::after { content: " \203A"; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--ink); color: #c8d7ee; font-size: .85rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .45rem 0; }
.regions { margin: 0; }
.social { list-style: none; display: flex; gap: 1.1rem; margin: 0; padding: 0; }
.social a { color: #c8d7ee; text-decoration: none; }
.social a:hover { color: var(--accent-light); }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); font: 700 1.05rem/1.15 var(--head); max-width: 280px; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.primary-nav { display: flex; align-items: center; gap: 1.75rem; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
.primary-nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--teal); box-shadow: 0 2px 0 var(--accent); }
.nav-cta { display: flex; gap: .6rem; }
.nav-cta .btn { padding: .7rem 1.1rem; font-size: .95rem; }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: var(--radius); padding: .5rem; line-height: 0; color: var(--ink); cursor: pointer; }
.nav-toggle .close, .nav-toggle.is-open .burger { display: none; }
.nav-toggle.is-open .close { display: block; }
.sub-toggle { display: none; background: none; border: 0; padding: .5rem; color: var(--ink); cursor: pointer; line-height: 0; }

.has-sub { position: relative; }
.primary-nav .sub {
  display: none; position: absolute; top: 100%; left: -1rem; min-width: 190px; padding: .6rem 0 !important;
  flex-direction: column; gap: 0 !important; background: var(--white); border: 1px solid var(--line);
  border-top: 3px solid var(--accent); box-shadow: 0 10px 24px rgba(13,39,72,.12);
}
/* Desktop only: open on hover / keyboard focus */
@media (min-width: 961px) {
  .primary-nav .has-sub:hover > .sub, .primary-nav .has-sub:focus-within > .sub { display: flex; }
}
.sub a { display: block; padding: .5rem 1.1rem; box-shadow: none !important; }
.sub a:hover { background: var(--mist); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #eaf3ff 0%, #f5f9ff 100%); color: var(--text); padding: clamp(3rem, 8vw, 6rem) 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { color: var(--ink); font-size: clamp(2.8rem, 7.2vw, 5.6rem); line-height: .98; letter-spacing: -0.03em; margin-bottom: .45em; }
.hero .lead { color: var(--muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-count { margin: 2rem 0 0; color: var(--muted); }
.hero-count strong { color: var(--accent); font: 700 1.6rem var(--head); margin-right: .25rem; }
.hero-photo { margin: 0; position: relative; }
.hero-photo::before { content: ""; position: absolute; inset: 1.4rem -1.4rem -1.4rem 1.4rem; background: var(--accent-soft); border-radius: var(--radius); }
.hero-photo img { position: relative; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: var(--radius); }

.hero .btn-ghost { border-color: var(--accent); color: var(--accent); }
.hero .btn-ghost:hover { background: var(--accent); color: var(--white); }

.lead { font-size: 1.2rem; line-height: 1.6; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.tint { background: var(--mist); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.section-head h2 { margin: 0; }

.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-img { width: 100%; aspect-ratio: 14 / 13; object-fit: cover; border-radius: var(--radius); }

/* The one signature motif: a footpath of dots, from "the feet of him who brings good news" */
.footpath {
  height: 14px;
  background: radial-gradient(circle, var(--accent-light) 3px, transparent 3.5px) 0 50% / 26px 14px repeat-x;
  opacity: .9;
}
.verse-band { background: var(--mist); }
.verse-band blockquote { margin: 0; max-width: 880px; }
.verse-band p { font: 600 clamp(1.4rem, 3vw, 2.1rem)/1.35 var(--head); color: var(--ink); letter-spacing: -0.01em; margin-bottom: .9em; }
.verse-band footer { color: var(--teal); font-weight: 600; }

/* Activities: open columns with a rule on top, not boxed cards */
.activity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.2rem 3rem; margin-top: 2rem; }
.activity { border-top: 3px solid var(--teal); padding-top: 1.1rem; }
.activity h3, .activity .h3 { margin-bottom: .5em; }
.activity .h3 a { text-decoration: none; color: var(--ink); }
.activity .h3 a:hover { color: var(--teal); }
.activity p { color: var(--muted); }
.activity-list { max-width: 820px; }
.activity-row { padding: 2rem 0; border-top: 1px solid var(--line); }
.activity-row:first-child { border-top: 0; padding-top: 0; }
.activity-row h2 { font-size: 1.7rem; }
.activity-row p { color: var(--muted); font-size: 1.12rem; margin: 0; }

.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* ---------- Posts ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2rem 1.6rem; }
.card { display: flex; flex-direction: column; background: var(--white); border-bottom: 3px solid var(--teal); }
.tint .card { background: var(--white); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 1.1rem 0 1.2rem; display: flex; flex-direction: column; flex: 1; }
.tint .card-body { padding-inline: 1.1rem; }
.card h3 { font-size: 1.2rem; margin-bottom: .45em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.card p { color: var(--muted); font-size: .98rem; }
.card .more { margin-top: auto; }
.meta { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-bottom: .5rem; }
.meta a { color: var(--teal); font-weight: 600; text-decoration: none; }
.empty { color: var(--muted); padding: 1.5rem 0; }
.after { margin-top: 2.5rem; }

.pagination { display: flex; gap: .4rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 2.5rem; padding: .5rem .8rem; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.pagination a:hover { border-color: var(--teal); }
.pagination [aria-current] { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- Inner pages ---------- */
.page-head { background: var(--mist); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .35em; }
.page-head .lead { max-width: 40em; margin: 0; }
.prose { font-size: 1.12rem; line-height: 1.75; }
.prose p { max-width: 68ch; }

.article-head { padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem; }
.article-head h1 { margin-bottom: 0; }
.article-figure { margin-bottom: 2.5rem; max-width: 960px; }
.article-figure img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); }
.article .prose { padding-bottom: 3rem; }
.share { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; font-size: .95rem; }
.share span { font-weight: 600; color: var(--ink); }
.share ul { list-style: none; display: flex; gap: 1rem; flex-wrap: wrap; margin: 0; padding: 0; }

.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery-grid a { display: block; overflow: hidden; border-radius: var(--radius); }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .25s; }
.gallery-grid a:hover img { transform: scale(1.04); }

/* ---------- Forms ---------- */
.form-wrap { max-width: 680px; }
.form label { display: block; font-weight: 600; margin: 1.1rem 0 .35rem; color: var(--ink); }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form input:not([type]), .form textarea {
  width: 100%; font: inherit; padding: .8rem .9rem; border: 1.5px solid #a9b8d0; border-radius: var(--radius); background: var(--white); color: var(--text);
}
.form input:focus, .form textarea:focus { border-color: var(--teal); outline: 3px solid rgba(23,105,209,.2); }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; margin-top: 1.4rem; }
.form .check input { margin-top: .4rem; width: 1.1rem; height: 1.1rem; flex: none; }
.form .btn { margin-top: 1.6rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.flash { padding: .85rem 1.1rem; border-radius: var(--radius); margin: 1.2rem 0; border: 1px solid; }
.flash-success { background: #e6f4ea; border-color: #9ccfa9; color: #174d2a; }
.flash-error { background: #fdeaea; border-color: #e5a3a3; color: #7a1d1d; }
.flash-info { background: #fff6dc; border-color: #ecd089; color: #5b4300; }

.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.contact-side { border-left: 3px solid var(--accent); padding-left: 1.6rem; }
.contact-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.contact-list li { margin-bottom: .4rem; }

/* ---------- Call to action ---------- */
.cta-band { background: var(--teal); color: var(--white); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.cta-band h2 { color: var(--white); margin-bottom: .3em; }
.cta-band p { margin: 0; color: #e4eefc; max-width: 36em; }
.cta-in { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta-band .actions { margin-top: 0; }

/* ---------- Home: impact numbers, pillars, steps, impact areas, get involved ---------- */
.stats-row { background: var(--white); border-bottom: 1px solid var(--line); }
.stats-row ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-row li { padding: 1.6rem 1.4rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: .15rem; }
.stats-row li:first-child { border-left: 0; padding-left: 0; }
.stats-row strong { font: 800 clamp(1.8rem, 3.4vw, 2.5rem)/1 var(--head); color: var(--teal); letter-spacing: -0.02em; }
.stats-row span { color: var(--muted); font-size: .95rem; }

.pillars { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.pillar { position: relative; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal); padding: 1.15rem 1.3rem 1.2rem; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.pillar h3 { font-size: 1.15rem; margin: 0; }
.sdg { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--teal); background: #e3edfb; padding: .15rem .65rem; border-radius: 99px; }
.flag-new { position: absolute; top: -.65rem; right: 1rem; background: var(--accent); color: var(--white); font-size: .74rem; font-weight: 700; padding: .15rem .7rem; border-radius: 99px; }

.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.steps li { position: relative; display: flex; flex-direction: column; gap: .7rem; padding-right: 1rem; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.5rem; left: 3.5rem; right: .5rem; height: 2px; background: var(--teal); }
.step-no { width: 3rem; height: 3rem; border: 2px solid var(--teal); border-radius: 50%; display: grid; place-items: center; font: 700 1.2rem var(--head); color: var(--teal); background: var(--white); }
.step-name { font: 700 1.15rem var(--head); color: var(--ink); }

.impact { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.impact li { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem 1rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; }
.impact strong { font: 700 1.05rem/1.25 var(--head); color: var(--ink); }
.impact .blurb { font-size: .88rem; line-height: 1.4; color: var(--muted); }
.ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; margin-bottom: .3rem; }

.cta-band .involve { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.8rem; }
.involve a { display: flex; align-items: center; gap: 1rem; background: var(--white); color: var(--ink); text-decoration: none; padding: 1.1rem 1.3rem; border-radius: 8px; border: 2px solid transparent; }
.involve a .txt { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.involve a > .icon-arrow { color: var(--accent); flex: none; transition: transform .15s; }
.involve a:hover > .icon-arrow { transform: translateX(3px); }
.involve a .ico { margin: 0; color: var(--accent); }
.involve .involve-main { background: var(--ink); color: var(--white); }
.involve .involve-main .ico { background: rgba(255,255,255,.14); color: var(--white); }
.involve .involve-main .txt > span { color: #c8d7ee; }
.involve .involve-main > .icon-arrow { color: var(--white); }
.involve a:hover { border-color: var(--ink); color: var(--ink); }
.involve .involve-main:hover { color: var(--white); border-color: var(--white); }
.involve strong { font: 700 1.3rem var(--head); }
.involve .txt > span { color: var(--muted); font-size: .95rem; }

@media (max-width: 960px) {
  .stats-row ul { grid-template-columns: repeat(2, 1fr); }
  .stats-row li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .impact { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .stats-row ul, .pillars, .cta-band .involve { grid-template-columns: 1fr; }
  .stats-row li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .stats-row li:first-child { border-top: 0; }
  .steps { grid-template-columns: 1fr; gap: 1.4rem; }
  .steps li { flex-direction: row; align-items: center; gap: 1rem; }
  .steps li:not(:last-child)::after { display: none; }
  .impact { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c0d0ea; padding-top: clamp(2.5rem, 6vw, 4rem); }
.site-footer a { color: #c0d0ea; text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand img { margin-bottom: 1rem; }
.footer-brand p { max-width: 26em; font-size: .98rem; }
.site-footer h2 { font-size: 1rem; color: var(--white); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.social-footer { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; padding: 1.2rem 0; border-top: 1px solid rgba(255,255,255,.15); font-size: .88rem; }
.footer-base p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(5,15,32,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 200; padding: 1.5rem; }
.lightbox img { max-height: 82vh; max-width: 100%; border-radius: var(--radius); }
.lightbox p { color: #e6eefb; margin: 1rem 0 0; text-align: center; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; background: var(--white); border: 0; border-radius: var(--radius); font: 600 .95rem var(--body); padding: .6rem 1rem; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .primary-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white);
    border-bottom: 1px solid var(--line); padding: 1rem 1.2rem 1.4rem; flex-direction: column; align-items: stretch; gap: 1.2rem;
    box-shadow: 0 14px 24px rgba(13,39,72,.1);
  }
  .primary-nav.open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: .2rem; }
  .primary-nav a { display: block; padding: .6rem 0; }
  .primary-nav a:hover, .primary-nav a[aria-current="page"] { box-shadow: none; }
  .has-sub { display: flex; flex-wrap: wrap; align-items: center; }
  .has-sub > a { flex: 1; }
  .sub-toggle { display: block; }
  .sub-toggle svg { transition: transform .2s ease; }
  .has-sub.open .sub-toggle svg { transform: rotate(180deg); }
  .primary-nav .sub { display: none; flex-basis: 100%; position: static; box-shadow: none; border: 0; padding: 0 0 0 1rem !important; min-width: 0; }
  .primary-nav .has-sub.open > .sub { display: block; }
  .nav-cta { flex-direction: row; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-photo { margin-right: 1.4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-side { border-left: 0; border-top: 3px solid var(--accent); padding: 1.4rem 0 0; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .regions { font-size: .78rem; }
  .social { display: none; }
  .activity-grid, .form .two, .strip { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand { max-width: 220px; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
