/* ─── TibaPay marketing site ───────────────────────────────────────────
   One stylesheet for the whole site. No framework, no webfonts: the CSP
   allows no external style/font origin, and system fonts render instantly
   on the mid-range Android hardware most Ugandan visitors browse on.     */

:root {
  --green-900: #06301f;
  --green-800: #0b4630;
  --green-700: #0b5b3e;   /* brand deep green */
  --green-600: #146c4a;
  --green-500: #1fa463;   /* brand fresh green */
  --green-100: #e6f4ec;
  --green-50:  #f2f9f5;

  --orange-600: #e06f00;
  --orange-500: #ff8a1a;  /* brand accent */
  --orange-100: #fff1e0;

  --ink-900: #0d1b16;
  --ink-700: #33443c;
  --ink-500: #5d6d65;
  --ink-300: #93a29b;

  --surface:  #ffffff;
  --canvas:   #f7faf8;
  --line:     #e2ebe6;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(6, 48, 31, .06), 0 1px 3px rgba(6, 48, 31, .04);
  --shadow:    0 4px 16px rgba(6, 48, 31, .07), 0 1px 3px rgba(6, 48, 31, .05);
  --shadow-lg: 0 18px 48px rgba(6, 48, 31, .12);

  --wrap: 1120px;
  --font: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--surface);
  /* Nothing may push the page sideways on a narrow phone. */
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  color: var(--ink-900);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 750;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.12rem, 1.9vw, 1.3rem); font-weight: 700; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-500); }

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

/* Visible focus everywhere — keyboard users must never lose their place. */
:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green-700); color: #fff; padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 650;
}
.skip-link:focus { left: 0; color: #fff; }

/* ─── Header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 80px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand img { width: 152px; height: auto; display: block; object-fit: contain; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav a {
  color: var(--ink-700); text-decoration: none; font-weight: 600; font-size: .97rem;
  padding: 9px 13px; border-radius: var(--radius-sm);
}
.nav a:hover { color: var(--green-700); background: var(--green-50); }
.nav a[aria-current="page"] { color: var(--green-700); background: var(--green-100); }

.header-cta { display: flex; align-items: center; gap: 10px; margin-left: 12px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; cursor: pointer; color: var(--ink-900); font: inherit; font-weight: 650;
  align-items: center; gap: 8px;
}
.nav-toggle:hover { border-color: var(--green-500); }
.nav-toggle svg { display: block; }

/* ─── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--orange-500); color: #23150a; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--orange-600); color: #fff; box-shadow: var(--shadow); }

.btn-dark { background: var(--green-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-dark:hover { background: var(--green-600); color: #fff; box-shadow: var(--shadow); }

.btn-ghost { background: transparent; color: var(--green-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green-500); background: var(--green-50); color: var(--green-700); }

.btn-on-dark { background: #fff; color: var(--green-800); }
.btn-on-dark:hover { background: var(--green-50); color: var(--green-800); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

.btn-sm { padding: 9px 17px; font-size: .93rem; }

/* ─── Sections ───────────────────────────────────────────────────────── */

section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tint { background: var(--canvas); }
.section-line { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
  color: var(--green-600);
}
.eyebrow-light { color: #7fe3b0; }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { font-size: 1.08rem; color: var(--ink-500); margin-bottom: 0; }
.section-head-center { margin-inline: auto; text-align: center; }

.lede { font-size: clamp(1.05rem, 1.9vw, 1.24rem); color: var(--ink-500); }

/* ─── Hero ───────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -10%, rgba(31, 164, 99, .20), transparent 62%),
    radial-gradient(760px 420px at 4% 108%, rgba(255, 138, 26, .14), transparent 60%),
    linear-gradient(168deg, #ffffff 0%, var(--green-50) 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(52px, 8vw, 92px) 0 clamp(56px, 8vw, 96px);
}

.hero-grid {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 64px); align-items: center;
}

.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--orange-600); display: block; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-note {
  margin-top: 20px; font-size: .93rem; color: var(--ink-500);
  display: flex; align-items: flex-start; gap: 8px;
}
.hero-note svg { flex: 0 0 auto; margin-top: 3px; }

/* Illustrative product panel — a summary of what an application shows, not a
   claim about any specific offer. */
.hero-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 26px; position: relative;
}
.hero-panel::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(150deg, rgba(31, 164, 99, .28), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-title { font-weight: 750; color: var(--ink-900); font-size: 1.02rem; }
.pill {
  font-size: .74rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase;
  background: var(--green-100); color: var(--green-700); padding: 5px 11px; border-radius: 999px;
}
.panel-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: .97rem;
}
.panel-row:last-of-type { border-bottom: 0; }
.panel-row dt { color: var(--ink-500); margin: 0; }
.panel-row dd { margin: 0; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.panel-foot {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--ink-500);
}

/* ─── Cards & grids ──────────────────────────────────────────────────── */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfe3d8; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-500); font-size: .98rem; }

.icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-100); color: var(--green-700); margin-bottom: 16px;
}
.icon-orange { background: var(--orange-100); color: var(--orange-600); }

/* Numbered steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 66px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 24px; top: 26px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-700); color: #fff;
  display: grid; place-items: center; font-weight: 750; font-size: 1rem;
}
.step { padding: 26px 26px 26px 74px; }

/* Checklists */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.check-list li { position: relative; padding-left: 32px; color: var(--ink-700); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--green-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.check-list-light li { color: rgba(255, 255, 255, .88); }

/* Split feature block */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

/* ─── Dark CTA band ──────────────────────────────────────────────────── */

.band {
  background:
    radial-gradient(760px 380px at 82% 8%, rgba(31, 164, 99, .34), transparent 60%),
    linear-gradient(150deg, var(--green-800), var(--green-900));
  color: rgba(255, 255, 255, .84);
}
.band h2, .band h3 { color: #fff; }
.band p { color: rgba(255, 255, 255, .82); }
.band .card {
  background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16);
  box-shadow: none; color: rgba(255, 255, 255, .82);
}
.band .card:hover { border-color: rgba(255, 255, 255, .3); }
.band .card p { color: rgba(255, 255, 255, .74); }
.band .icon { background: rgba(255, 255, 255, .12); color: #7fe3b0; }

.cta-final { text-align: center; }
.cta-final .section-head { margin-inline: auto; }
.cta-final .hero-actions { justify-content: center; }

/* ─── FAQ ────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 12px; max-width: 840px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px 22px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.faq details[open] { border-color: #cfe3d8; box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
  font-weight: 700; color: var(--ink-900); font-size: 1.03rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 11px; height: 11px;
  border-right: 2.5px solid var(--green-600); border-bottom: 2.5px solid var(--green-600);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .faq-body { padding: 0 0 20px; color: var(--ink-500); font-size: .99rem; }

/* ─── Prose (legal pages) ────────────────────────────────────────────── */

.prose { max-width: 780px; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.prose h2:first-of-type { margin-top: 1em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: .5em; }
.prose .updated { color: var(--ink-500); font-size: .93rem; }

.page-head {
  background: linear-gradient(168deg, var(--green-50), #fff);
  border-bottom: 1px solid var(--line);
  padding: clamp(44px, 6vw, 72px) 0 clamp(36px, 5vw, 56px);
}
.page-head p { max-width: 680px; }

/* ─── Contact ────────────────────────────────────────────────────────── */

.contact-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.contact-card h3 { margin-bottom: 6px; }
.contact-card a { font-weight: 650; word-break: break-word; }

/* ─── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--green-900); color: rgba(255, 255, 255, .68);
  padding: clamp(48px, 6vw, 72px) 0 32px; font-size: .95rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .13);
}
.footer-brand img { width: 144px; height: auto; opacity: .95; object-fit: contain; }
.footer-brand p { margin-top: 14px; max-width: 320px; color: rgba(255, 255, 255, .62); font-size: .92rem; }
.site-footer h4 {
  color: #fff; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase;
  margin-bottom: 14px; font-weight: 750;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255, 255, 255, .74); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-legal { padding-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.footer-legal p { font-size: .87rem; color: rgba(255, 255, 255, .55); max-width: 680px; }

/* ─── 404 ────────────────────────────────────────────────────────────── */

.notfound { text-align: center; padding: clamp(72px, 12vw, 140px) 0; }
.notfound .code {
  font-size: clamp(3.6rem, 12vw, 6rem); font-weight: 800; line-height: 1;
  color: var(--green-700); letter-spacing: -.04em; margin-bottom: 8px;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }

  /* Collapsed menu: hidden from assistive tech and tab order until opened. */
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 12px 20px 20px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 12px; font-size: 1.02rem; }
  .header-cta {
    display: none; flex-direction: column; align-items: stretch; gap: 10px;
    margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
  }
  .header-cta.is-open { display: flex; }
  .header-cta .btn { width: 100%; }
  .site-header { position: relative; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-inner { min-height: 72px; }
  .brand img { width: 128px; height: auto; }
  .footer-brand img { width: 124px; height: auto; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .step { padding-left: 66px; }
  .step::before { left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
