/* BFA Platform — Business for Africa Inc.
   Clean, professional B2B. Mobile-first. */

:root {
  --blue: #5BB4E2;
  --blue-dark: #3d9bcf;
  --blue-light: #e8f4fb;
  --ink: #1a1a1a;
  --gray: #5a5a5a;
  --gray-light: #f8f9fa;
  --gray-border: #e2e6ea;
  --white: #ffffff;
  --radius: 8px;
  --max-w: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo img { height: 44px; width: auto; display: block; }

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
}
.main-nav a:hover { color: var(--blue-dark); text-decoration: none; }
.main-nav a.cta-nav {
  background: var(--blue);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
}
.main-nav a.cta-nav:hover { background: var(--blue-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #0f2a3d 0%, #1a4a68 100%);
  color: var(--white);
  padding: 72px 0 64px;
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 16px;
  max-width: 640px;
}

.hero p.lead {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 600px;
  margin-bottom: 32px;
}

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

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #333; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-gray { background: var(--gray-light); }

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  font-weight: 700;
}
.section .section-sub {
  color: var(--gray);
  font-size: 1.05rem;
  margin-bottom: 36px;
  max-width: 680px;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--gray); font-size: 0.96rem; margin-bottom: 14px; }
.card .price {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 14px;
  display: block;
}
.card .card-link { font-weight: 600; }

.section-gray .card { box-shadow: 0 1px 3px rgba(0,0,0,0.04); }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 24px 24px 24px 76px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { margin-bottom: 8px; font-size: 1.1rem; }
.step p { color: var(--gray); font-size: 0.95rem; }

/* ---------- Trust / honesty ---------- */
.honest-box {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px 32px;
  margin: 12px 0;
}
.honest-box p { font-size: 1.02rem; }
.honest-box strong { color: var(--ink); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, #0f2a3d 0%, #1a4a68 100%);
  color: var(--white);
  padding: 56px 0 48px;
}
.page-hero h1 { font-size: 2rem; margin-bottom: 12px; }
.page-hero p { opacity: 0.9; max-width: 640px; font-size: 1.05rem; }
.breadcrumb { font-size: 0.85rem; opacity: 0.75; margin-bottom: 14px; }
.breadcrumb a { color: var(--white); }

/* ---------- Service detail ---------- */
.service-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}
.meta-box {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.meta-box .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  font-weight: 600;
  margin-bottom: 4px;
}
.meta-box .value { font-weight: 700; font-size: 1.1rem; }

.deliverables { margin: 24px 0; }
.deliverables li {
  list-style: none;
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px solid var(--gray-border);
}
.deliverables li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  color: var(--blue-dark);
  font-weight: 700;
}

.prose h2 { font-size: 1.5rem; margin: 36px 0 14px; }
.prose h3 { font-size: 1.2rem; margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; color: #333; }
.prose ul { margin: 12px 0 20px 20px; }
.prose li { margin-bottom: 8px; color: #333; }

.cta-band {
  background: linear-gradient(135deg, #0f2a3d 0%, #1a4a68 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  margin: 48px 0;
}
.cta-band h2 { color: var(--white); margin-bottom: 10px; }
.cta-band p { opacity: 0.9; margin-bottom: 24px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: var(--font);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91,180,226,0.15);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 18px; }
.form-note { font-size: 0.85rem; color: var(--gray); margin-top: 12px; }
.form-success {
  background: #e6f7ed;
  border: 1px solid #a9dfc0;
  color: #1c6b3c;
  padding: 18px 22px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: none;
}
.form-error {
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #a33a2e;
  padding: 18px 22px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: none;
}

/* ---------- Chat widget ---------- */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-fab:hover { background: var(--blue-dark); }

.chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: calc(100vw - 48px);
  max-width: 400px;
  height: 520px;
  max-height: calc(100vh - 130px);
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  border: 1px solid var(--gray-border);
}
.chat-panel.open { display: flex; }

.chat-header {
  background: linear-gradient(135deg, #0f2a3d 0%, #1a4a68 100%);
  color: var(--white);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-header img { height: 32px; width: auto; }
.chat-header .chat-title { font-weight: 700; font-size: 1rem; }
.chat-header .chat-sub { font-size: 0.8rem; opacity: 0.8; }
.chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  opacity: 0.8;
}
.chat-close:hover { opacity: 1; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--gray-light);
}

.chat-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.93rem;
  line-height: 1.55;
  word-wrap: break-word;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--blue);
  color: var(--white);
  border-bottom-right-radius: 3px;
}
.chat-msg.assistant {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-bottom-left-radius: 3px;
}
.chat-msg.assistant p { margin-bottom: 8px; }
.chat-msg.assistant p:last-child { margin-bottom: 0; }
.chat-msg.assistant ul, .chat-msg.assistant ol { margin: 8px 0 8px 18px; }
.chat-msg.assistant li { margin-bottom: 4px; }
.chat-msg.assistant strong { font-weight: 700; }
.chat-msg.assistant code {
  background: #eef1f4;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.86em;
}

.chat-cta-btn {
  display: inline-block;
  margin-top: 10px;
  background: var(--blue);
  color: var(--white) !important;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none !important;
}
.chat-cta-btn:hover { background: var(--blue-dark); }

.chat-typing {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.9rem;
  color: var(--gray);
}

.chat-input-row {
  display: flex;
  border-top: 1px solid var(--gray-border);
  padding: 10px;
  gap: 8px;
  background: var(--white);
}
.chat-input-row input {
  flex: 1;
  border: 1px solid var(--gray-border);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 0.93rem;
  font-family: var(--font);
}
.chat-input-row input:focus {
  outline: none;
  border-color: var(--blue);
}
.chat-input-row button {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}
.chat-input-row button:hover { background: var(--blue-dark); }
.chat-input-row button:disabled { opacity: 0.5; cursor: default; }

/* Embedded homepage chat */
.chat-embedded {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  height: 480px;
}
.chat-embedded .chat-messages { min-height: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f2a3d;
  color: rgba(255,255,255,0.82);
  padding: 56px 0 28px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.site-footer h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-footer a { color: rgba(255,255,255,0.75); font-size: 0.93rem; }
.site-footer a:hover { color: var(--white); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.footer-logo img { height: 40px; margin-bottom: 14px; }
.footer-logo p { font-size: 0.9rem; max-width: 300px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 900px) {
  .hero h1 { font-size: 3rem; }
  .hero { padding: 96px 0 84px; }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .service-meta { grid-template-columns: repeat(4, 1fr); }
  .chat-panel { width: 400px; }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 20px 24px;
    border-bottom: 1px solid var(--gray-border);
    gap: 16px;
    align-items: flex-start;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 1.9rem; }
  .section { padding: 48px 0; }
}
