/* 
  Kenya Clarity — serious, high-trust landing page
  Constraints: no frameworks, no external assets, low-bandwidth friendly

  CSS goals:
  - Strong hierarchy and long-form readability
  - Calm visuals, minimal decoration
  - Mobile-first, responsive layout
  - Accessible contrasts and focus states
*/

/* ---------- Base ---------- */
:root{
  --bg: #ffffff;
  --ink: #0f172a;      /* deep slate */
  --muted: #475569;    /* slate */
  --subtle: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --soft2:#f1f5f9;
  --accent:#0b3b74;    /* sober blue */
  --accent2:#0a2b52;
  --ok:#0f766e;
  --warn:#b45309;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(2,6,23,.06), 0 8px 30px rgba(2,6,23,.06);

  --max: 1120px;
  --pad: 18px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

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

a{ color: var(--accent); text-underline-offset: 3px; }
a:hover{ color: var(--accent2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible{
  outline: 3px solid rgba(11, 59, 116, .25);
  outline-offset: 2px;
  border-radius: 10px;
}

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

/* Skip link */
.skip-link{
  position: absolute;
  left: -999px;
  top: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 9999;
}
.skip-link:focus{ left: 12px; }

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 12px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover{ color: var(--ink); }
.brand-mark{ color: var(--accent); }
.brand-text{
  font-weight: 700;
  letter-spacing: .2px;
}

.header-actions{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Buttons ---------- */
.btn{
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .1px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
.btn-small{ padding: 8px 10px; border-radius: 10px; font-weight: 700; }
.btn-ghost{
  border-color: var(--line);
  background: #fff;
}
.btn-ghost:hover{ background: var(--soft); }
.btn-outline{
  border-color: rgba(11,59,116,.30);
  color: var(--accent);
  background: #fff;
}
.btn-outline:hover{ border-color: rgba(11,59,116,.55); background: var(--soft); }
.btn-primary{
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover{ background: var(--accent2); border-color: var(--accent2); }

.lang-switch{
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.lang-switch .btn{
  border: 0;
  border-radius: 0;
}
.lang-switch .btn[aria-pressed="true"]{
  background: var(--soft2);
}

/* ---------- Hero ---------- */
.hero{
  padding: 34px 0 10px;
  background: linear-gradient(180deg, var(--soft) 0%, #fff 55%);
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 22px;
  align-items: start;
}

.eyebrow{
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.hero-title{
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.4px;
}
.hero-subtitle{
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
  max-width: 60ch;
}

.trust-points{
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}
.trust-points li{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
}
.dot{
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(11,59,116,.25);
  margin-top: 6px;
  flex: 0 0 auto;
}

.hero-cta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.disclaimer{
  margin: 0;
  color: var(--subtle);
  font-size: 13.5px;
}

.hero-panel{
  display: grid;
  gap: 12px;
}

.panel-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.panel-muted{ background: var(--soft); }
.panel-title{
  margin: 0 0 8px;
  font-size: 16px;
}
.panel-text{
  margin: 0 0 14px;
  color: var(--muted);
}

.panel-grid{
  display: grid;
  gap: 12px;
}
.panel-item{
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.panel-item h3{
  margin: 0 0 6px;
  font-size: 14px;
}
.panel-item p{
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13.8px;
}
.link{
  font-weight: 700;
  font-size: 13.8px;
}

.checklist{
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--muted);
}
.checklist-x{ color: #6b7280; }

/* ---------- Sections ---------- */
.section{
  padding: 38px 0;
}
.section-alt{
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head{
  margin-bottom: 16px;
}
.section-head h2{
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -.2px;
}
.section-sub{
  margin: 0;
  color: var(--muted);
  max-width: 75ch;
}

/* Pillars grid */
.pillars{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 10px;
  min-height: 190px;
}
.card h3{
  margin: 0;
  font-size: 16px;
  letter-spacing: -.1px;
}
.card p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.tag-row{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag{
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft2);
  color: var(--muted);
}
.card ul{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13.6px;
}
.card .card-actions{
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.card .small{
  font-size: 12.5px;
  color: var(--subtle);
}

/* Grids */
.grid-2{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Callout */
.callout{
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin: 16px 0;
}
.callout-inner h3{
  margin: 0 0 4px;
  font-size: 15px;
}
.callout-inner p{
  margin: 0;
  color: var(--muted);
}

/* Note */
.note{
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-top: 14px;
}
.note-icon{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--soft2);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--muted);
}
.note-title{
  margin: 0 0 3px;
  font-weight: 800;
}
.note-text{
  margin: 0;
  color: var(--muted);
}

/* Accordion */
.accordion{
  display: grid;
  gap: 10px;
}
.acc-item{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.acc-button{
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}
.acc-button span{ color: var(--ink); }
.acc-button em{
  font-style: normal;
  color: var(--muted);
  font-weight: 900;
}
.acc-panel{
  padding: 0 16px 14px;
  color: var(--muted);
  display: none;
}
.acc-item[data-open="true"] .acc-panel{ display: block; }

/* Forms */
.form{
  max-width: 640px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.form-row{
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.form-row-inline{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.label{ font-weight: 800; font-size: 13px; }
.input, .select{
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}
.form-help{
  margin: 0;
  color: var(--subtle);
  font-size: 13px;
}
.form-msg{
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* Final section */
.final{
  display: grid;
  gap: 10px;
  text-align: left;
}
.final-text{
  margin: 0;
  color: var(--muted);
  max-width: 80ch;
  font-size: 16px;
}
.final-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 26px 0 18px;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 16px;
}
.footer-brand{
  margin: 0 0 6px;
  font-weight: 900;
}
.footer-text{
  margin: 0;
  color: var(--muted);
}
.footer-title{
  margin: 0 0 8px;
  font-weight: 900;
}
.footer-links{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.footer-links a{ text-decoration: none; }
.footer-links a:hover{ text-decoration: underline; }

.footer-bottom{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.muted{ color: var(--subtle); font-size: 13px; margin: 0; }

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 90;
}
.modal[data-open="true"]{ display: grid; }
.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.45);
}
.modal-card{
  position: relative;
  margin: auto;
  width: min(720px, calc(100% - 24px));
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.modal-title{ margin: 0; font-size: 16px; }
.modal-body{ padding: 14px; color: var(--muted); }
.modal-body p{ margin: 0 0 10px; }
.modal-body p:last-child{ margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .pillars{ grid-template-columns: repeat(2, 1fr); }
  .grid-3{ grid-template-columns: repeat(2, 1fr); }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px){
  .header-actions{ gap: 8px; }
  #openSearch{ display: none; } /* keep header compact on small screens */
  .pillars{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}
