/* ============================================================
   Christian Missions Centre — Machakos
   Shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Brand blues */
  --blue-950: #0F1838;
  --blue-900: #15224F;
  --blue-800: #1C2D6B;
  --blue:     #253A8F;  /* official primary */
  --blue-600: #324AAD;
  --blue-500: #4A63C9;
  --blue-400: #7286D7;
  --blue-300: #9DACE2;
  --blue-200: #C7D0F0;
  --blue-100: #E3E8F8;
  --blue-50:  #F2F4FC;

  /* Brand red — used sparingly */
  --red:      #B91516;  /* official red */
  --red-600:  #CF2425;
  --red-50:   #FBEDED;

  /* Warm neutrals */
  --ink:      #14182B;
  --ink-soft: #424862;
  --paper:    #FBFAF7;
  --sand:     #F3F1EA;
  --line:     #E7E4DC;
  --white:    #FFFFFF;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(20,24,43,.06);
  --shadow:    0 14px 40px -18px rgba(20,24,43,.28);
  --shadow-lg: 0 30px 70px -28px rgba(21,34,79,.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.center { text-align: center; }

/* ---------- Type helpers ---------- */
.display { font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: .98; font-weight: 800; }
.h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--ink-soft); font-weight: 400; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--red); display: inline-block; }
.eyebrow.on-dark { color: var(--blue-200); }
.muted { color: var(--ink-soft); }
.accent-red { color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font); font-weight: 700; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  line-height: 1; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(37,58,143,.7); }
.btn-primary:hover { background: var(--blue-800); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(185,21,22,.6); }
.btn-red:hover { background: var(--red-600); }
.btn-outline { border-color: var(--blue-200); color: var(--blue); background: transparent; }
.btn-outline:hover { border-color: var(--blue); background: var(--blue-50); }
.btn-ghost-light { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.btn-arrow::after { content: "→"; font-weight: 600; transition: transform .18s ease; }
.btn-arrow:hover::after { transform: translateX(4px); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--blue);
}
.link-arrow::after { content: "→"; transition: transform .18s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,247,.82);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { max-width: 1320px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 78px; }
.nav-logo { flex: 0 0 auto; display: flex; align-items: center; }
.nav-logo img { height: 42px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.nav-links a {
  font-size: .9rem; font-weight: 600; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 999px; transition: color .15s ease, background .15s ease;
  white-space: nowrap;
}
.nav-cta .btn { white-space: nowrap; }
.nav-links a:hover { color: var(--blue); background: var(--blue-50); }
.nav-links a.active { color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.nav-toggle { display: none; }

.nav-toggle {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; width: 46px; height: 46px;
  align-items: center; justify-content: center; cursor: pointer; color: var(--blue);
}
.nav-toggle svg { width: 22px; height: 22px; }
.mobile-menu {
  position: fixed; inset: 78px 0 0 0; z-index: 49; background: var(--paper);
  padding: 24px; display: none; flex-direction: column; gap: 6px; overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1.15rem; font-weight: 700; color: var(--ink); padding: 16px 14px;
  border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu a::after { content: "→"; color: var(--blue-300); }
.mobile-menu .btn { margin-top: 18px; justify-content: center; }

/* ---------- Language switcher ---------- */
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  background: var(--blue-50); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px;
}
.lang-btn {
  border: none; background: transparent; cursor: pointer;
  line-height: 1; padding: 4px 9px;
  border-radius: 999px; transition: background .15s ease;
  display: flex; align-items: center; gap: 5px;
}
.lang-btn:hover { background: var(--blue-100); }
.lang-btn.active { background: #fff; box-shadow: 0 1px 4px rgba(20,24,43,.12); }
.lang-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  color: var(--ink); font-family: inherit;
}

@media (max-width: 1180px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .lang-switch { display: none; }
}
@media (min-width: 1181px) {
  .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Image slots ---------- */
image-slot {
  --slot-bg: var(--blue-50);
  background: var(--blue-50);
  box-shadow: var(--shadow);
}

/* placeholder look for plain divs */
.ph {
  background:
    repeating-linear-gradient(45deg, rgba(37,58,143,.05) 0 12px, rgba(37,58,143,.09) 12px 24px),
    var(--blue-50);
  border: 1px solid var(--blue-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-500); font-family: ui-monospace, 'SF Mono', monospace; font-size: .8rem;
  letter-spacing: .04em; text-align: center; padding: 16px; border-radius: var(--radius);
}

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-200); }

/* pill / chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-50); color: var(--blue); border: 1px solid var(--blue-100);
  border-radius: 999px; padding: 7px 15px; font-size: .82rem; font-weight: 700;
}
.chip.red { background: var(--red-50); color: var(--red); border-color: #f3cccc; }

/* ---------- Section index (the 7 areas) ---------- */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.area {
  position: relative; display: block; padding: 28px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.area:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--blue-200); }
.area .num {
  font-size: .78rem; font-weight: 800; letter-spacing: .12em; color: var(--blue-300);
}
.area h3 { margin: 14px 0 8px; font-size: 1.32rem; }
.area p { font-size: .95rem; color: var(--ink-soft); }
.area .go { margin-top: 18px; color: var(--blue); font-weight: 700; font-size: .9rem; }
.area .go::after { content: " →"; }
.area::after {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 90px; height: 90px;
  border-radius: 50%; background: var(--blue-50); transition: transform .25s ease, background .25s ease; z-index: 0;
}
.area:hover::after { transform: scale(1.5); background: var(--blue-100); }
.area > * { position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-950); color: #C9D1EC; padding: 72px 0 36px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; letter-spacing: 0; }
.site-footer a { color: #C9D1EC; font-size: .95rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo {
  background: #fff; border-radius: 12px; padding: 12px 16px; display: inline-block; margin-bottom: 18px;
}
.footer-logo img { height: 38px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-bottom {
  margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: #8896C4;
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .wrap { padding: 0 22px; }
}

/* ---------- Utility ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 32px; } }

.on-blue { background: var(--blue); color: #fff; }
.on-blue .muted, .on-blue p { color: rgba(255,255,255,.82); }
.on-sand { background: var(--sand); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

img.cover { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(155deg, var(--blue-900), var(--blue) 70%);
  padding: 116px 0 64px;
}
.page-hero .breadcrumb { font-size: .82rem; font-weight: 600; color: var(--blue-200); margin-bottom: 18px; letter-spacing: .04em; }
.page-hero .breadcrumb a { color: var(--blue-200); }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); color: #fff; max-width: 18ch; }
.page-hero p { color: rgba(255,255,255,.84); font-size: 1.2rem; max-width: 56ch; margin-top: 18px; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.05); }
.page-hero .gridlines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 60px 60px; mask-image: radial-gradient(circle at 85% 0%, #000, transparent 70%); }
.page-hero .wrap { position: relative; z-index: 2; }

/* ---------- Prose ---------- */
.prose p { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose h3 { font-size: 1.5rem; margin: 36px 0 14px; }

/* ---------- Feature row (image + text) ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature.flip .feat-media { order: 2; }
.feat-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--blue-50); }
.feat-media.tall { aspect-ratio: 3 / 4; }
.feat-media.wide { aspect-ratio: 16 / 9; }
@media (max-width: 860px){ .feature { grid-template-columns: 1fr; gap: 30px; } .feature.flip .feat-media { order: 0; } }

/* ---------- Stat band ---------- */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.statband .s .k { font-size: clamp(2rem,3.4vw,2.8rem); font-weight: 800; color: var(--blue); line-height: 1; }
.statband .s .k .accent-red { color: var(--red); }
.statband .s .l { color: var(--ink-soft); font-size: .95rem; margin-top: 8px; }
@media (max-width: 720px){ .statband { grid-template-columns: 1fr 1fr; gap: 28px 18px; } }

/* ---------- Timeline / steps ---------- */
.steps { display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 22px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-sm); }
.step .n { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-50); color: var(--blue); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.step.red .n { background: var(--red-50); color: var(--red); }
.step h4 { font-size: 1.15rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Photo gallery grid ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; grid-auto-flow: dense; }
.gallery .g { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; min-height: 180px; }
.gallery .g img { transition: transform .5s ease; }
.gallery .g:hover img { transform: scale(1.05); }
.gallery .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 14px; background: linear-gradient(transparent, rgba(15,24,56,.82)); color: #fff; font-size: .9rem; font-weight: 600; }
.g-6 { grid-column: span 6; } .g-5 { grid-column: span 5; } .g-7 { grid-column: span 7; }
.g-4 { grid-column: span 4; } .g-8 { grid-column: span 8; } .g-3 { grid-column: span 3; }
.g-tall { grid-row: span 2; }
@media (max-width: 860px){ .gallery { grid-template-columns: repeat(2, 1fr); } .gallery .g { grid-column: span 1 !important; } .gallery .g-wide-m { grid-column: span 2 !important; } }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 64px 56px; color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue)); box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); }
.cta-band::after { content:""; position:absolute; right:-60px; bottom:-60px; width:240px; height:240px; border-radius:50%; background: rgba(185,21,22,.25); }
.cta-band > * { position: relative; z-index: 1; }
@media (max-width: 600px){ .cta-band { padding: 40px 26px; } }

/* ---------- Verse / pull quote ---------- */
.verse { text-align: center; max-width: 900px; margin: 0 auto; }
.verse blockquote { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin: 0; color: var(--blue-900); }
.verse blockquote .accent-red { color: var(--red); }
.verse cite { display: block; margin-top: 20px; font-style: normal; font-weight: 700; color: var(--blue); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }

/* list with check */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; color: var(--ink-soft); font-size: 1.05rem; }
.ticks li::before { content: "✓"; color: var(--blue); font-weight: 800; background: var(--blue-50); border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.ticks.red li::before { color: var(--red); background: var(--red-50); }

/* ---------- Auth & forms (CMC styled) ---------- */
.auth-shell { min-height: calc(100vh - 76px); display: flex; align-items: center; justify-content: center;
  padding: 72px 20px; background: linear-gradient(180deg, var(--sand), var(--paper)); }
.auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-lg); }
.auth-card .auth-logo { display: block; margin-bottom: 22px; }
.auth-card .auth-logo img { height: 40px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .auth-sub { color: var(--ink-soft); font-size: .96rem; margin-bottom: 26px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-weight: 700; font-size: .9rem; color: var(--ink); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  font-family: var(--font); font-size: 1rem; background: #fff; color: var(--ink); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.form-error { color: var(--red); font-size: .82rem; }
.form-status { background: #DCFCE7; border: 1px solid #86EFAC; color: #166534; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; }
.form-row-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; flex-wrap: wrap; }
.form-row-inline label { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-soft); }
.auth-meta { margin-top: 22px; font-size: .92rem; color: var(--ink-soft); text-align: center; }
.auth-meta a { color: var(--blue); font-weight: 700; }
.btn-block { width: 100%; justify-content: center; }
