/*
 * Homepage specific composition for bingwaflash.co.ke.
 * Clean, centered SaaS product layout strictly using green, yellow, black, and white.
 */

:root {
  --home-green: var(--bf-green);
  --home-green-deep: var(--bf-green-strong);
  --home-yellow: var(--bf-yellow);
}

body.bf-home {
  margin: 0;
  background: var(--bf-bg);
  color: var(--bf-text);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

.bf-home *, .bf-home *::before, .bf-home *::after {
  box-sizing: border-box;
}

.bf-home a {
  color: inherit;
  text-decoration: none;
}

.bf-home .home-wrap {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

/* HEADER */
.home-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(16px, calc((100vw - 1140px) / 2));
  background: var(--bf-header);
  border-bottom: 1px solid var(--bf-border);
  transition: background .2s, border-color .2s;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--bf-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.home-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}
.home-brand b {
  color: var(--bf-green);
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.home-nav a {
  color: var(--bf-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--bf-pill);
  transition: var(--bf-transition);
}
.home-nav a:hover, .home-nav a.active {
  color: var(--bf-text);
  background: var(--bf-surface-raised);
}

.home-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.home-theme, .home-menu {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--bf-border);
  background: var(--bf-surface);
  color: var(--bf-yellow);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--bf-transition);
}
.home-theme:hover, .home-menu:hover {
  color: var(--bf-yellow-strong);
  border-color: var(--bf-yellow);
}
.home-menu {
  display: none;
  font-size: 1.25rem;
}

.header-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  background: var(--bf-green);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--bf-pill);
  transition: var(--bf-transition);
  white-space: nowrap;
}
.header-support-btn:hover {
  background: var(--bf-green-strong);
}

/* HERO SECTION - Centered */
.home-hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bf-selection);
  border: 1px solid rgba(21, 167, 108, 0.3);
  border-radius: var(--bf-pill);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--bf-green);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 auto 18px;
  max-width: 820px;
  color: var(--bf-text);
}
.hero-title .hero-title-accent {
  color: var(--bf-green);
  display: block;
}

.hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.12rem);
  line-height: 1.65;
  color: var(--bf-text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  background: var(--bf-green);
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 10px;
  border: 1px solid var(--bf-green-strong);
  transition: var(--bf-transition);
}
.btn-hero-primary:hover {
  background: var(--bf-green-strong);
  transform: translateY(-1px);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  background: var(--bf-surface);
  color: var(--bf-text) !important;
  border: 1px solid var(--bf-border);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
  transition: var(--bf-transition);
}
.btn-hero-secondary:hover {
  background: var(--bf-surface-raised);
  border-color: var(--bf-border-strong);
}

.hero-microcopy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--bf-text-soft);
  margin: 0 auto 40px;
  font-weight: 600;
}

/* STATS BOX (4 columns desktop / 2x2 grid mobile) */
.stats-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-lg);
  box-shadow: var(--bf-shadow);
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}

.stat-col {
  padding: 18px 12px;
  text-align: center;
}
.stat-col + .stat-col {
  border-left: 1px solid var(--bf-border);
}
.stat-col strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--bf-text);
  letter-spacing: -0.02em;
}
.stat-col small {
  display: block;
  font-size: 0.72rem;
  color: var(--bf-text-muted);
  margin-top: 3px;
  font-weight: 600;
}

/* QUICK RESOURCES / FEATURE GRID */
.quick-section {
  padding: 32px 0 56px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-card {
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-lg);
  padding: 22px 18px;
  box-shadow: var(--bf-shadow);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  transition: var(--bf-transition);
}
.quick-card:hover {
  border-color: var(--bf-green);
  transform: translateY(-2px);
}

.quick-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.quick-card-icon svg {
  width: 20px;
  height: 20px;
}
.quick-card-icon.green { background: var(--bf-icon-badge-green); color: var(--bf-green); }
.quick-card-icon.yellow { background: var(--bf-icon-badge-yellow); color: var(--bf-yellow-strong); }
.quick-card-icon.neutral { background: var(--bf-icon-badge-neutral); color: var(--bf-text); }

.quick-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--bf-text);
}
.quick-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--bf-text-muted);
  line-height: 1.45;
}

/* HOW IT RUNS - 3 STEPS */
.home-section {
  padding: 56px 0;
  border-top: 1px solid var(--bf-border);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}
.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bf-green);
  margin-bottom: 8px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--bf-text);
}
.section-head p {
  font-size: 0.95rem;
  color: var(--bf-text-muted);
  margin: 0;
  line-height: 1.6;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-lg);
  padding: 28px 24px;
  box-shadow: var(--bf-shadow);
  display: flex;
  flex-direction: column;
}
.step-number {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--bf-green);
  background: var(--bf-selection);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.step-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--bf-text);
}
.step-card p {
  font-size: 0.85rem;
  color: var(--bf-text-muted);
  margin: 0;
  line-height: 1.6;
}

/* RELIEF FEATURES */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-lg);
  padding: 26px 22px;
  box-shadow: var(--bf-shadow);
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--bf-text);
}
.feature-card h3 em {
  font-style: normal;
  color: var(--bf-green);
}
.feature-card p {
  font-size: 0.84rem;
  color: var(--bf-text-muted);
  margin: 0;
  line-height: 1.6;
}

/* FAQ SECTION */
.faq-wrap {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-card {
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  overflow: hidden;
  box-shadow: var(--bf-shadow);
}
.faq-card summary {
  padding: 18px 22px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--bf-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.faq-card summary::-webkit-details-marker {
  display: none;
}
.faq-card summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--bf-text-muted);
  transition: transform 0.2s;
}
.faq-card[open] summary::after {
  content: "−";
}
.faq-card p {
  padding: 0 22px 20px;
  margin: 0;
  font-size: 0.86rem;
  color: var(--bf-text-muted);
  line-height: 1.65;
}

/* CTA BANNER */
.home-cta-banner {
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-xl);
  padding: 48px 32px;
  text-align: center;
  margin: 20px auto 48px;
  max-width: 820px;
  box-shadow: var(--bf-shadow);
}
.home-cta-banner h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--bf-text);
}
.home-cta-banner p {
  font-size: 0.92rem;
  color: var(--bf-text-muted);
  max-width: 540px;
  margin: 0 auto 24px;
}

/* FOOTER */
.home-footer {
  padding: 56px 0 36px;
  background: var(--bf-surface);
  border-top: 1px solid var(--bf-border);
}
.footer-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-brand p {
  font-size: 0.82rem;
  color: var(--bf-text-muted);
  margin: 0;
  max-width: 280px;
}
.footer-col h3 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bf-text);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  font-size: 0.82rem;
  color: var(--bf-text-muted);
  margin-bottom: 8px;
  transition: color 0.15s;
}
.footer-col a:hover {
  color: var(--bf-green);
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--bf-border);
  font-size: 0.74rem;
  color: var(--bf-text-soft);
  text-align: center;
}

/* RESPONSIVENESS */
@media(max-width: 900px) {
  .home-nav {
    display: none;
  }
  .home-nav.is-open {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    background: var(--bf-surface);
    border-bottom: 1px solid var(--bf-border);
    gap: 8px;
  }
  .home-nav.is-open a {
    padding: 10px 14px;
    border-radius: 8px;
  }
  .home-menu {
    display: inline-grid;
  }
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid, .features-grid {
    grid-template-columns: 1fr;
  }
  .footer-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width: 600px) {
  .home-header {
    height: 60px;
    padding: 0 16px;
  }
  .header-support-btn {
    display: none; /* Keep mobile bar clean and un-squeezed */
  }
  .home-hero {
    padding: 36px 0 24px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-hero-primary, .btn-hero-secondary {
    width: 100%;
  }
  .stats-box {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-col:nth-child(2) {
    border-right: none;
  }
  .stat-col:nth-child(3), .stat-col:nth-child(4) {
    border-top: 1px solid var(--bf-border);
  }
  .stat-col:nth-child(3) {
    border-left: none;
  }
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .quick-card {
    padding: 16px 14px;
    min-height: 125px;
  }
  .quick-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    margin-bottom: 10px;
  }
  .footer-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
