/*
 * Fixes on top of the design handoff's site.css (loaded after it).
 * site.css is imported verbatim by scripts/import_handoff.py and must not be
 * edited by hand; put deliberate deviations here, each with its reason.
 */

/*
 * Home "From limit to M-Pesa" story, phones (≤760px): the coral circle behind
 * each step's phone (.story .stage::before, 110% wide) extends ~34px past the
 * right edge of the screen, widening the whole page to ~389px on a 375px phone
 * (sideways wobble). Clip what lies beyond the section; everything visible on
 * screen is unchanged. `clip` (not `hidden`) keeps position:sticky working.
 *
 * Same for the WhatsApp chat mockup (.wa-stage, home + /whatsapp): on 320px
 * screens its 300px phone overhangs the column by 4px.
 */
.section:has(.story),
.section:has(.wa-stage) {
  overflow-x: clip;
}

/*
 * Typeface: Inter everywhere (moniepoint.com's text font; their heading face,
 * Aventa, is a paid licence). The handoff routes all type through two
 * variables — --font (text, was Plus Jakarta Sans) and --serif (headings, was
 * Fraunces) — so overriding them switches the whole site.
 */
:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/*
 * Branches map: labels that would collide with a nearby branch's label are
 * hidden (class added by the importer's "branch map" patch) and appear on
 * hover / keyboard focus of that pin.
 */
.pin-g text {
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.pin-g text.hid {
  opacity: 0;
  transition: opacity 0.15s;
}
.pin-g:hover text.hid,
.pin-g:focus text.hid,
.pin-g:focus-visible text.hid {
  opacity: 1;
}

/*
 * Icons inside buttons. The handoff only sizes them for green WhatsApp buttons
 * (.btn-wa svg: 20px); the red "Check my loan" buttons now carry the WhatsApp
 * glyph too, and an unsized SVG blows up in the stretched mobile-bar button
 * (and collapses to nothing in the hero). Same size as .btn-wa.
 */
.btn > svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/*
 * App store badges (repay #app, home closing band). Added by the importer's
 * "store badges" patches; links go to the real App Store / Google Play listings.
 */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 18px 8px 14px;
  border-radius: 14px;
  background: var(--ink-900);
  border: 2px solid var(--ink-900);
  color: var(--white);
  text-decoration: none;
  line-height: 1.1;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.store-badge:hover {
  transform: translateY(-1px);
  background: #000;
}
.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.store-badge span {
  display: grid;
  text-align: left;
}
.store-badge small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}
.store-badge b {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
/* On the dark closing band, invert so the badges stand out. */
.cta-band .store-badge {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink-900);
}
.cta-band .store-badge:hover {
  background: var(--brand-50, #fff4f3);
}

/*
 * "Powered by Apenia" row under "Why borrowers choose WeLend" (home): links to
 * the Apenia website and Apenia Verify. Full-width row below the four reasons.
 */
.logos .apx {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  padding-top: 18px;
  border-top: 1px dashed var(--ink-100);
}
.logos .apx-lab {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-right: 6px;
}
.logos .apx-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink-200);
  background: var(--white);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.logos .apx-btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand-500);
}
.logos .apx-btn img {
  width: 20px;
  height: auto;
}
.logos .apx-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.logos .apx-btn .ext {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}
.logos .apx-dark {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--white);
}
.logos .apx-dark svg {
  color: var(--brand-300, #fea5a1);
}
.logos .apx-dark .ext {
  color: var(--white);
}
.logos .apx-dark:hover {
  background: #000;
  border-color: #000;
}
@media (max-width: 760px) {
  .logos .apx {
    justify-content: flex-start;
  }
  .logos .apx-lab {
    flex-basis: 100%;
    margin: 0;
  }
}
