/*
Theme Name: K-HAKI Theme
Theme URI: https://kituochahaki.co.ke
Author: K-HAKI Team
Author URI: https://kituochahaki.co.ke
Description: Custom WordPress theme for K-HAKI - Centre for Humanity, Advocacy, Knowledge & Innovation
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: khaki
*/

/* ========================================
   K-HAKI WordPress Theme Styles
   ======================================== */

:root {
  --red: #C0392B;
  --red-dk: #96281B;
  --red-sf: rgba(192,57,43,0.1);
  --green: #27AE60;
  --grn-dk: #1E8449;
  --grn-sf: rgba(39,174,96,0.1);
  --brown: #3E2723;
  --brown2: #2C1810;
  --brown-m: #6D4C41;
  --brown-l: #8D6E63;
  --cream: #FFF8F5;
  --sand: #F0E6DF;
  --white: #FFFFFF;
  --black: #1A1A1A;
  --mid: #4A3728;
  --light: #9E7B6E;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', monospace;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* WordPress Required Classes */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--mid);
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.site-header {
  background: var(--brown);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-nav {
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand {
  font-family: var(--serif);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  text-decoration: none;
}

.nav-brand sup {
  font-size: 0.52em;
  color: var(--red);
  vertical-align: super;
}

.main-navigation {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.main-navigation a {
  color: rgba(255,255,255,0.78);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.main-navigation a:hover,
.main-navigation a.active,
.main-navigation .current-menu-item a {
  color: #fff;
}

.nav-cta-btn {
  background: var(--red);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 1.4rem;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta-btn:hover {
  background: var(--red-dk);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }
  
  .main-navigation {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--brown);
    flex-direction: column;
    padding: 1rem 5%;
    gap: 1rem;
  }
  
  .main-navigation.active {
    display: flex;
  }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  background: var(--brown2);
  min-height: 86vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44,24,16,0.95), rgba(62,39,35,0.9));
}

.hero-dots {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(circle, rgba(255,255,255,0.7) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 5rem 5%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-inner h1 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
}

.hero-inner h1 em {
  color: var(--red);
  font-style: italic;
}

.hero-inner .lead {
  color: rgba(255,255,255,0.75);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  backdrop-filter: blur(10px);
}

.hstat .num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.hstat .num span {
  color: var(--red);
}

.hstat .lbl {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.35rem;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.btn-red {
  background: var(--red);
  color: #fff;
}

.btn-red:hover {
  background: var(--red-dk);
  transform: translateY(-2px);
}

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

.btn-green:hover {
  background: var(--grn-dk);
  transform: translateY(-2px);
}

.btn-brown {
  background: var(--brown);
  color: #fff;
}

.btn-brown:hover {
  background: var(--brown2);
}

.btn-ow {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-ow:hover {
  background: rgba(255,255,255,0.15);
}

.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.84rem;
}

/* ========================================
   SECTIONS & UTILITIES
   ======================================== */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 0.8rem;
}

.eyebrow-w {
  color: rgba(255,200,180,0.9);
}

.divider {
  width: 48px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
  margin: 1.2rem 0 1.8rem;
}

.divider-g {
  background: var(--green);
}

.section {
  padding: 5rem 5%;
}

.sec-white {
  background: #fff;
}

.sec-cream {
  background: var(--cream);
}

.sec-sand {
  background: var(--sand);
}

.sec-brown {
  background: var(--brown);
  color: #fff;
}

.sec-brown2 {
  background: var(--brown2);
  color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

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

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

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  background: var(--brown2);
  color: rgba(255,255,255,0.65);
  padding: 4rem 5% 2rem;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--green), var(--brown), var(--red));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-desc {
  font-size: 0.84rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: rgba(255,255,255,0.55);
}

.footer-contact p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.35rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #fff;
}

.social-row {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.social-row a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.social-row a:hover {
  background: var(--red);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

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