/* Thirdway Alliance Kenya — design system
   Brand colours kept from the original site: deep teal #163838, gold #b68513, sage #85a6a6.
   Kenyan-flag black/red/green is used sparingly as an accent stripe. */
:root {
  --teal-950: #0c2222;
  --teal-900: #163838;
  --teal-800: #1f4a4a;
  --teal-700: #2b6060;
  --sage: #85a6a6;
  --sage-100: #e6eeee;
  --gold: #b68513;
  --gold-600: #966b0e;
  --gold-300: #e3c35f;
  --gold-100: #f8efd3;
  --paper: #fbf9f4;
  --white: #fff;
  --ink: #17292a;
  --ink-soft: #4d6061;
  --line: #e2e6e4;
  --flag-black: #111;
  --flag-red: #bb0000;
  --flag-green: #006600;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(12,34,34,.06), 0 8px 24px rgba(12,34,34,.08);
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fira Sans", "DM Sans", system-ui, sans-serif;
  --wrap: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: 400 1.0625rem/1.7 var(--font-body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-underline-offset: 3px; }
a:hover { color: var(--gold-600); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--teal-900); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.eyebrow { font: 700 .8rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; display: inline-flex; gap: .6rem; align-items: center; }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: linear-gradient(90deg, var(--flag-black) 33%, var(--flag-red) 33% 66%, var(--flag-green) 66%); border-radius: 2px; }
.flagbar { height: 5px; background: linear-gradient(90deg, var(--flag-black) 0 33.3%, var(--flag-red) 33.3% 66.6%, var(--flag-green) 66.6%); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; font: 600 1rem/1 var(--font-head); padding: .95rem 1.5rem; border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, color .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 6px 18px rgba(182,133,19,.35); }
.btn-gold:hover { background: var(--gold-600); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--teal-900); }
.btn-outline { border-color: var(--teal-900); color: var(--teal-900); }
.btn-outline:hover { background: var(--teal-900); color: #fff; }
.btn-sm { padding: .65rem 1.1rem; font-size: .92rem; }

/* Top bar + header */
.topbar { background: var(--teal-950); color: #cfe0e0; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .5rem; flex-wrap: wrap; }
.topbar a { color: #cfe0e0; text-decoration: none; }
.topbar a:hover { color: var(--gold-300); }
.topbar .contact, .topbar .social { display: flex; gap: 1.2rem; align-items: center; }
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; }
.lang button { background: none; border: 0; color: #cfe0e0; font: 600 .78rem var(--font-head); padding: .3rem .7rem; cursor: pointer; }
.lang button[aria-current="true"] { background: var(--gold); color: #fff; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,249,244,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--teal-900); }
.brand img { width: 54px; height: 54px; }
.brand strong { font: 700 1.15rem/1.1 var(--font-head); display: block; letter-spacing: .02em; text-transform: uppercase; }
.brand small { color: var(--gold-600); font-weight: 600; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav > a, .nav summary { font: 600 .98rem var(--font-head); color: var(--teal-900); text-decoration: none; padding: .6rem .8rem; border-radius: 8px; cursor: pointer; list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: "▾"; margin-left: .3rem; font-size: .75em; color: var(--gold); }
.nav > a:hover, .nav summary:hover, .nav a[aria-current="page"] { background: var(--gold-100); color: var(--gold-600); }
.nav details { position: relative; }
.nav .menu { position: absolute; top: 100%; left: 0; min-width: 270px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; margin-top: .4rem; z-index: 5; }
.nav .menu a { display: block; padding: .6rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .96rem; }
.nav .menu a:hover { background: var(--sage-100); color: var(--teal-900); }
.nav-toggle { display: none; background: none; border: 2px solid var(--teal-900); border-radius: 10px; padding: .5rem .7rem; font: 600 .9rem var(--font-head); color: var(--teal-900); }

/* Hero */
.hero { position: relative; color: #fff; background: var(--teal-950) url("../img/hero.7e93da2483e1.jpg") center/cover; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(12,34,34,.96) 0%, rgba(22,56,56,.88) 45%, rgba(22,56,56,.45) 100%); z-index: -1; }
.hero .wrap { padding-block: clamp(4rem, 10vw, 8rem); display: grid; grid-template-columns: 1.3fr .7fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: var(--gold-300); }
.hero .lead { font-size: 1.25rem; max-width: 40ch; color: #dbe9e9; }
.hero .cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.hero .slogan { font: 700 1rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); margin-top: 2rem; }
.hero .badge { justify-self: center; width: min(320px, 70%); filter: drop-shadow(0 20px 40px rgba(0,0,0,.45)); }
.page-hero { background: var(--teal-900); color: #fff; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 340px; height: 340px; border-radius: 50%; border: 50px solid rgba(182,133,19,.18); }
.page-hero .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0; }
.page-hero p { color: #cfe0e0; font-size: 1.15rem; margin: .8rem 0 0; max-width: 60ch; }
.crumbs { font-size: .88rem; color: var(--sage); margin-bottom: .8rem; }
.crumbs a { color: var(--gold-300); text-decoration: none; }

/* Sections */
section.block { padding-block: clamp(3.5rem, 8vw, 6rem); }
section.tint { background: var(--sage-100); }
section.dark { background: var(--teal-900); color: #dbe9e9; }
section.dark h2, section.dark h3 { color: #fff; }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.grid { display: grid; gap: 1.5rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
a.card { text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(12,34,34,.14); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); }
.card .more { margin-top: auto; font: 600 .95rem var(--font-head); color: var(--gold-600); }
.pillar-num { width: 46px; height: 46px; border-radius: 12px; background: var(--gold-100); color: var(--gold-600); font: 700 1.25rem var(--font-head); display: grid; place-items: center; margin-bottom: 1rem; }
.tick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.tick div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 1.4rem; }
.tick b { display: block; font: 700 3rem/1 var(--font-head); color: var(--gold-300); }
.quote { border-left: 5px solid var(--gold); padding: .4rem 0 .4rem 1.5rem; font: 500 1.4rem/1.5 var(--font-head); color: var(--teal-900); }
.leader-photo { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; width: 100%; }

/* Prose (CMS body) */
.prose { max-width: 78ch; }
.prose.wide { max-width: none; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--gold); }
.prose img { border-radius: var(--radius); margin-block: 1.5rem; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.5rem; border-left: 5px solid var(--gold); background: var(--gold-100); border-radius: 0 var(--radius) var(--radius) 0; }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; }
.prose th { background: var(--sage-100); }
.prose ol[type="a"] { list-style: lower-alpha; }
.prose ol[type="i"] { list-style: lower-roman; }

/* Document layout (manifesto, constitution) */
.doc { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start; }
.toc { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-600); margin-bottom: .8rem; }
.toc input { width: 100%; padding: .65rem .9rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; margin-bottom: .8rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: .4rem .6rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .93rem; line-height: 1.35; }
.toc a:hover, .toc a.active { background: var(--gold-100); color: var(--gold-600); }
.doc-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.4rem); margin-bottom: 1.5rem; }
.doc-section h2 { font-size: 1.5rem; }
.doc-section .num { color: var(--gold); font-weight: 700; margin-right: .4rem; }
mark { background: #ffe58a; padding: 0 .15em; border-radius: 3px; }
.empty { display: none; padding: 1rem; color: var(--ink-soft); }

/* People */
.person { text-align: center; }
.person img, .person .ph { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 4px solid var(--gold-100); box-shadow: var(--shadow); }
.person .ph { background: var(--sage-100); display: grid; place-items: center; color: var(--sage); font: 700 2.4rem var(--font-head); }
.person h3 { margin: 0; font-size: 1.15rem; }
.person p { margin: .2rem 0 0; color: var(--gold-600); font-weight: 600; font-size: .92rem; }
.person .soon { color: var(--ink-soft); font-weight: 400; font-style: italic; }

/* Forms */
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--teal-900); }
.field input[type=text], .field input[type=email], .field textarea, .field select { width: 100%; padding: .85rem 1rem; border: 1.5px solid #c9d3d1; border-radius: 10px; font: inherit; background: #fff; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 4px rgba(182,133,19,.18); }
.field.check label { display: flex; gap: .7rem; font-weight: 400; align-items: flex-start; }
.field.check input { margin-top: .4rem; accent-color: var(--gold); }
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; color: var(--flag-red); font-size: .9rem; }
.messages { list-style: none; margin: 0; padding: 0; }
.messages li { padding: 1rem 1.3rem; border-radius: 10px; margin-block: 1rem; background: #e7f3ea; border: 1px solid #b6d8bf; color: #174d27; }
.messages li.error { background: #fbe9e9; border-color: #efb8b8; color: #7a1313; }
.hp { position: absolute; left: -9999px; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: .9rem; margin-bottom: 1.4rem; }
.contact-list b { display: block; color: var(--teal-900); font-family: var(--font-head); }

/* CTA + footer */
.cta-band { background: linear-gradient(120deg, var(--gold-600), var(--gold)); color: #fff; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; padding-block: 3rem; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band .btn { background: #fff; color: var(--teal-900); }
.site-footer { background: var(--teal-950); color: #b5c9c9; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 3rem; padding-block: 4rem 3rem; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.site-footer a { color: #b5c9c9; text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.3rem; font-size: .88rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sub-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.sub-form input[type=email] { flex: 1 1 180px; padding: .85rem 1rem; border-radius: 999px; border: 0; font: inherit; }
.sub-form select { display: none; }
.sub-note { font-size: .82rem; margin-top: .6rem; }

/* Status / 404 */
.center-card { max-width: 560px; margin: 5rem auto; text-align: center; }

@media (max-width: 960px) {
  .hero .wrap, .split, .contact-grid, .doc { grid-template-columns: 1fr; }
  .hero .badge { order: -1; width: 160px; justify-self: start; }
  .toc { position: static; max-height: none; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem; }
  .nav.open { display: flex; }
  .nav .menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 .8rem; }
  .site-header .wrap { position: relative; }
}
@media (max-width: 600px) {
  .site-footer .cols { grid-template-columns: 1fr; }
  .topbar .social { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .site-header, .site-footer, .toc, .cta-band { display: none; } body { background: #fff; } .doc { display: block; } }
