/* ============================================================
   SABA AFRICA — Page Stylesheet
   ============================================================ */


/* ────────────────────────────────────────
   SECTION 1 — HERO
──────────────────────────────────────── */
.af-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.af-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.af-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.af-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    /* No top scrim — nav uses dark text over this light hero (body.hero-light).
       Bottom fade keeps the white headline legible + blends into the section. */
    linear-gradient(
      to top,
      var(--black) 0%,
      rgba(6, 6, 6, 0.68) 14%,
      rgba(6, 6, 6, 0.26) 32%,
      transparent 52%
    );
}

.af-hero-text {
  position: relative;
  z-index: 10;
  padding: 0 8% 80px;
  max-width: 660px;
}

.af-hero-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display-1);
  line-height: 0.95;
  color: var(--white);
  margin-top: 20px;
  text-shadow: 0 2px 32px rgba(0,0,0,0.8);
}

.af-hero-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--white-soft);
  margin-top: 28px;
  max-width: 520px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}

.af-hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}


/* ────────────────────────────────────────
   SECTION 2 — PROBLEM STATEMENT
──────────────────────────────────────── */
.af-problem {
  background: var(--black);
  padding: 120px 8%;
}

.af-problem-inner {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.af-problem-number {
  font-family: var(--font-display);
  font-weight: 300;
  /* Slightly reduced from --display-monument (this figure ran a touch large) */
  font-size: clamp(3.2rem, 7vw, 8.2rem);
  line-height: 0.95;
  color: var(--white);
}

.af-problem-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body);
  letter-spacing: 0.04em;
  color: var(--white-soft);
  margin-top: 24px;
}

.af-problem-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display-3);
  line-height: var(--leading-body);
  color: var(--white-soft);
  margin-top: 40px;
}


/* ────────────────────────────────────────
   SECTION 3 — CREDIBILITY STRIP
──────────────────────────────────────── */
.af-credibility {
  background: var(--black-deep);
  padding: 80px 8%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.af-credibility-inner {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.af-cred-rule {
  width: 28px;
  height: 1px;
  background: var(--green);
  margin: 16px auto 36px;
}

.af-cred-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display-3);
  line-height: var(--leading-body);
  color: var(--white);
}

.af-green {
  color: var(--green);
}


/* ────────────────────────────────────────
   SECTION 4 — THE SCALE
──────────────────────────────────────── */
.af-scale {
  background: var(--black);
  padding: 120px 8%;
}

.af-scale-header {
  text-align: center;
  margin-bottom: 70px;
}

.af-scale-rule {
  width: 28px;
  height: 1px;
  background: var(--green);
  margin: 16px auto 0;
}

.af-scale-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.af-scale-col {
  padding: 0 60px;
  text-align: center;
  position: relative;
}

.af-scale-col + .af-scale-col::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 1px;
  background: rgba(0, 173, 71, 0.25);
}

.af-scale-col:first-child { padding-left: 0; }
.af-scale-col:last-child  { padding-right: 0; }

.af-scale-number {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display-hero);
  line-height: 0.9;
  color: var(--white);
  white-space: nowrap;
}

.af-scale-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin-top: 16px;
}

.af-scale-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--white-soft);
  margin-top: 10px;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}


/* ────────────────────────────────────────
   SECTION 5 — EPC SERVICES
──────────────────────────────────────── */
.af-epc {
  background: var(--black-deep);
  padding: 120px 8%;
}

.af-epc-header {
  margin-bottom: 60px;
}

.af-epc-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display-2);
  line-height: var(--leading-display);
  color: var(--white);
  margin-top: 12px;
  max-width: 600px;
}

/* EPC intro carries a media-split (Pattern A); the card grid sits below.
   Generous gap so the numbered steps get breathing room under the photo. */
.af-epc-intro {
  margin-bottom: clamp(80px, 8vw, 112px);
}

.af-epc-intro .af-epc-header {
  margin-bottom: 0;
}

.af-epc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--container-max);
  margin-inline: auto;
}

.af-epc-card {
  padding: 0 40px;
  position: relative;
}

.af-epc-card + .af-epc-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 1px;
  background: rgba(0, 173, 71, 0.25);
}

.af-epc-card:first-child { padding-left: 0; }
.af-epc-card:last-child  { padding-right: 0; }

.af-epc-number {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 3rem;
  line-height: 1;
  color: var(--white);
  opacity: 0.2;
}

.af-epc-rule {
  width: 20px;
  height: 1px;
  background: var(--green);
  margin: 16px 0;
}

.af-epc-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 12px;
}

.af-epc-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--white-soft);
}


/* ────────────────────────────────────────
   SECTION 6 — THE ROLLOUT
──────────────────────────────────────── */
.af-rollout {
  background: var(--black);
}

.af-rollout-inner {
  display: grid;
  grid-template-columns: 55% 45%;
  min-height: 600px;
  align-items: stretch;
}

.af-rollout-image {
  position: relative;
  overflow: hidden;
}

/* The Nigeria dot map now sits as a centered spotlight below the split
   (moved out of the text column, which had made the row too tall and
   upscaled the rollout photo). */
.af-rollout-map {
  padding: 80px 8% 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.af-rollout-map .af-map-wrap {
  margin-top: 0;
  max-width: min(560px, 88vw);
}

.af-rollout-map .af-map-name,
.af-rollout-map .af-map-note {
  text-align: center;
}

.af-rollout-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.af-rollout-text {
  padding: 80px 6% 80px 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.af-rollout-rule {
  width: 28px;
  height: 1px;
  background: var(--green);
  margin: 16px 0 28px;
}

.af-rollout-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display-2);
  line-height: var(--leading-display);
  color: var(--white);
}

.af-rollout-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--white-soft);
  margin-top: 28px;
  max-width: 420px;
}

.af-rollout-cta {
  margin-top: 36px;
  display: inline-block;
}


/* ────────────────────────────────────────
   SECTION 7 — WHY SABA AFRICA
──────────────────────────────────────── */
.af-why {
  background: var(--black-deep);
  padding: 120px 8%;
}

.af-why-header {
  text-align: center;
  margin-bottom: 70px;
}

.af-why-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display-2);
  line-height: var(--leading-display);
  color: var(--white);
  margin-top: 12px;
}

.af-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.af-why-card {
  padding: 32px 36px;
  border-top: 1px solid rgba(0, 173, 71, 0.40);
  position: relative;
}

.af-why-card + .af-why-card {
  border-left: 1px solid var(--border);
}

.af-why-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.af-why-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--white-soft);
}


/* ────────────────────────────────────────
   SECTION 8 — CTA
──────────────────────────────────────── */
.af-cta {
  background: var(--black);
  padding: 120px 8%;
  border-top: 1px solid var(--border);
}

.af-cta-inner {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.af-cta-rule {
  width: 28px;
  height: 1px;
  background: var(--green);
  margin: 16px auto 48px;
}

.af-cta-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display-1);
  line-height: var(--leading-display);
  color: var(--white);
  max-width: 800px;
  margin: 0 auto;
}

.af-cta-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--white-soft);
  max-width: 480px;
  margin: 24px auto 0;
}

.af-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}


/* ────────────────────────────────────────
   RESPONSIVE — ≤ 1024px: tablet
──────────────────────────────────────── */
@media (max-width: 1024px) {

  /* EPC — 4-col → 2×2 */
  .af-epc-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }

  .af-epc-card:nth-child(2n+1)::before {
    display: none;
  }

  .af-epc-card:nth-child(2n+1) {
    padding-left: 0;
  }

  .af-epc-card:nth-child(2n) {
    padding-right: 0;
  }
}


/* ────────────────────────────────────────
   RESPONSIVE — ≤ 768px
──────────────────────────────────────── */
@media (max-width: 768px) {

  /* Hero */
  .af-hero-text {
    padding: 0 6% 60px;
    max-width: 100%;
  }

  .af-hero-headline {
    font-size: var(--display-2);
    line-height: var(--leading-display);
  }

  .af-hero-body {
    font-size: var(--text-body);
    max-width: 100%;
  }

  .af-hero-overlay {
    background:
      linear-gradient(
        to bottom,
        rgba(6, 6, 6, 0.50) 0%,
        transparent 18%
      ),
      linear-gradient(
        to top,
        var(--black) 0%,
        rgba(6, 6, 6, 0.85) 15%,
        rgba(6, 6, 6, 0.60) 35%,
        transparent 55%
      );
  }

  .af-hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .af-hero-buttons .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  /* Problem */
  .af-problem {
    padding: 80px 6%;
  }

  /* Credibility */
  .af-credibility {
    padding: 60px 6%;
  }

  /* Scale — single column */
  .af-scale {
    padding: 80px 6%;
  }

  .af-scale-grid {
    grid-template-columns: 1fr;
  }

  .af-scale-col {
    padding: 40px 0;
    text-align: center;
  }

  .af-scale-col:first-child {
    padding-top: 0;
  }

  .af-scale-col:last-child {
    padding-bottom: 0;
  }

  .af-scale-col + .af-scale-col::before {
    display: none;
  }

  .af-scale-col + .af-scale-col {
    border-top: 1px solid rgba(0, 173, 71, 0.2);
  }

  .af-scale-sub {
    max-width: 100%;
  }

  /* EPC — single column */
  .af-epc {
    padding: 80px 6%;
  }

  .af-epc-grid {
    grid-template-columns: 1fr;
  }

  .af-epc-card {
    padding: 40px 0;
  }

  .af-epc-card:first-child {
    padding-top: 0;
  }

  .af-epc-card:last-child {
    padding-bottom: 0;
  }

  .af-epc-card + .af-epc-card::before {
    display: none;
  }

  .af-epc-card + .af-epc-card {
    border-top: 1px solid rgba(0, 173, 71, 0.2);
  }

  /* Rollout — text first, image second */
  .af-rollout-inner {
    grid-template-columns: 1fr;
  }

  .af-rollout-image {
    order: 2;
    min-height: 300px;
  }

  .af-rollout-text {
    padding: 60px 6%;
    order: 1;
  }

  .af-rollout-body {
    max-width: 100%;
  }

  /* Why — single column */
  .af-why {
    padding: 80px 6%;
  }

  .af-why-grid {
    grid-template-columns: 1fr;
  }

  .af-why-card + .af-why-card {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  /* CTA */
  .af-cta {
    padding: 80px 6%;
  }

  .af-cta-headline {
    font-size: var(--display-2);
  }

  .af-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .af-cta-buttons .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 320px;
  }
}


/* ────────────────────────────────────────
   MOTION SYSTEM — counters, dot map, card awakening
──────────────────────────────────────── */
.af-problem-number,
.af-scale-number {
  font-variant-numeric: tabular-nums;
}

/* Nigeria dot-matrix map (decorative; assembled by JS) */
.af-map-wrap {
  margin-top: 56px;
  max-width: min(600px, 80vw);
}

.af-map-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.af-map-name {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  margin-top: 24px;
}

.af-map-note {
  font-size: var(--text-sm);
  color: var(--white-dim);
  margin-top: 6px;
}

@media (hover: hover) {

  .af-epc-card + .af-epc-card::before {
    transition: background 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .af-epc-card:hover::before {
    background: var(--green);
  }

  .af-epc-number {
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .af-epc-card:hover .af-epc-number {
    opacity: 0.4;
  }

  .af-epc-title {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .af-epc-card:hover .af-epc-title {
    transform: translateY(-2px);
  }

  .af-why-card {
    transition: border-top-color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .af-why-card:hover {
    border-top-color: var(--green);
  }

  .af-why-title {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .af-why-card:hover .af-why-title {
    transform: translateY(-2px);
  }
}
