/* Rekodi — marketing site. Mobile-first, trustworthy Kenyan fintech. */
:root {
  --green:        #0e7a4b;   /* primary — confident, M-Pesa-familiar */
  --green-dark:   #0a5c38;
  --green-soft:   #e7f4ec;
  --ink:          #16211c;   /* near-black text */
  --slate:        #4b5a52;   /* secondary text */
  --line:         #e2e8e3;
  --bg:           #ffffff;
  --bg-alt:       #f6f9f7;
  --amber:        #e8a33d;
  --wa-bg:        #ece5dd;    /* whatsapp chat canvas */
  --wa-out:       #dcf8c6;    /* outgoing bubble */
  --wa-in:        #ffffff;    /* incoming bubble */
  --radius:       14px;
  --shadow:       0 1px 2px rgba(16,33,24,.06), 0 8px 24px rgba(16,33,24,.06);
  --maxw:         1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
p { margin: 0 0 1em; color: var(--slate); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--slate); }
.center { text-align: center; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800;
  font-size: 1.2rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; display: block; }
.nav-links { display: none; gap: 26px; align-items: center; }
.nav-links a { color: var(--slate); font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta { display: inline-block; background: var(--green); color: #fff; padding: 9px 16px;
  border-radius: 10px; font-weight: 600; font-size: .9rem; }
.nav-cta:hover { background: var(--green-dark); text-decoration: none; color: #fff; }
@media (min-width: 760px) { .nav-links { display: flex; } }

/* ---- buttons ---- */
.btn { display: inline-block; border-radius: 11px; padding: 13px 22px; font-weight: 600;
  font-size: 1rem; cursor: pointer; border: 1px solid transparent; transition: .15s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-dark); text-decoration: none; }

/* ---- hero ---- */
.hero { background: linear-gradient(180deg, var(--green-soft) 0%, #fff 70%); padding: 46px 0 36px; }
.hero-grid { display: grid; gap: 34px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line); color: var(--green-dark); font-weight: 600; font-size: .82rem;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px; box-shadow: var(--shadow); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.hero h1 { font-size: 2.1rem; color: var(--ink); }
.hero h1 .hl { color: var(--green); }
.hero .lead { font-size: 1.12rem; color: var(--slate); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-note { margin-top: 16px; font-size: .86rem; color: var(--slate); }
@media (min-width: 860px) {
  .hero { padding: 70px 0 56px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .hero h1 { font-size: 2.7rem; }
}

/* ---- phone / whatsapp mock ---- */
.phone { width: 300px; max-width: 86vw; margin: 0 auto; background: #0b141a; border-radius: 34px;
  padding: 11px; box-shadow: 0 20px 50px rgba(16,33,24,.22); border: 1px solid #0b141a; }
.phone-screen { background: var(--wa-bg); border-radius: 24px; overflow: hidden; }
.wa-top { background: var(--green-dark); color: #fff; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; }
.wa-avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--green-dark);
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.wa-top .who { font-weight: 600; font-size: .95rem; line-height: 1.1; }
.wa-top .status { font-size: .72rem; opacity: .85; }
.wa-body { padding: 14px 12px 18px;
  background-image: radial-gradient(rgba(0,0,0,.025) 1px, transparent 1px);
  background-size: 14px 14px; min-height: 320px; }
.bubble { max-width: 82%; padding: 8px 11px; border-radius: 10px; margin-bottom: 9px;
  font-size: .86rem; line-height: 1.4; color: #111b21; box-shadow: 0 1px 1px rgba(0,0,0,.08);
  position: relative; }
.bubble .t { display: block; font-size: .64rem; color: #667781; text-align: right; margin-top: 3px; }
.bubble.in  { background: var(--wa-in); border-top-left-radius: 2px; margin-right: auto; }
.bubble.out { background: var(--wa-out); border-top-right-radius: 2px; margin-left: auto; }
.bubble.sys { background: #fff5d6; color: #5a4b16; text-align: center; max-width: 92%;
  margin: 0 auto 10px; font-size: .74rem; box-shadow: none; }
.bubble .led { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem;
  background: rgba(14,122,75,.07); border-radius: 6px; padding: 6px 8px; margin-top: 6px;
  color: var(--green-dark); white-space: pre; display: block; overflow-x: auto; }

/* ---- sections ---- */
section { padding: 50px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--green); font-weight: 700; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 10px; }
.section-head { max-width: 58ch; margin-bottom: 30px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ---- steps ---- */
.steps { display: grid; gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); }
.step .n { width: 34px; height: 34px; border-radius: 9px; background: var(--green-soft);
  color: var(--green-dark); font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { margin: 0; font-size: .95rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* ---- feature cards ---- */
.cards { display: grid; gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--green-soft);
  display: grid; place-items: center; margin-bottom: 14px; color: var(--green-dark); }
.card h3 { font-size: 1.1rem; }
.card p { margin: 0; font-size: .96rem; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ---- example split ---- */
.example { display: grid; gap: 30px; align-items: center; }
.example .ledger { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); }
.ledger table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ledger th { text-align: left; color: var(--slate); font-weight: 600; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ledger td.amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .dr { color: var(--green-dark); }
.ledger .cr { color: var(--ink); }
@media (min-width: 880px) { .example { grid-template-columns: .9fr 1.1fr; } }

/* ---- cta band ---- */
.band { background: var(--green); color: #fff; border-radius: 20px; padding: 36px 26px; text-align: center; }
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.9); max-width: 50ch; margin-left: auto; margin-right: auto; }
.band .btn-primary { background: #fff; color: var(--green-dark); }
.band .btn-primary:hover { background: #f1f1f1; }

/* ---- footer ---- */
.site-footer { background: #0c1a13; color: #c9d6cd; padding: 44px 0 30px; font-size: .92rem; }
.footer-grid { display: grid; gap: 26px; }
.site-footer a { color: #c9d6cd; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
  margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800;
  font-size: 1.15rem; margin-bottom: 10px; }
.footer-brand .logo { width: 28px; height: 28px; border-radius: 7px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; color: #8ea197; font-size: .84rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }

/* ---- legal / article pages ---- */
.page-hero { background: var(--green-soft); padding: 40px 0; border-bottom: 1px solid var(--line); }
.page-hero h1 { color: var(--ink); margin-bottom: 6px; }
.article { padding: 40px 0 56px; }
.article .prose { max-width: 72ch; }
.article h2 { font-size: 1.25rem; margin-top: 2em; color: var(--ink); }
.article h3 { font-size: 1.05rem; margin-top: 1.5em; }
.article p, .article li { color: #35443b; }
.article ul { padding-left: 20px; }
.article li { margin-bottom: .5em; }
.draft-banner { background: #fff6e6; border: 1px solid #f0d9a8; border-left: 4px solid var(--amber);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 26px; }
.draft-banner strong { color: #8a6416; }
.draft-banner p { margin: 6px 0 0; color: #6b5a30; font-size: .94rem; }
.meta { color: var(--slate); font-size: .86rem; }

/* ---- live demo ---- */
.sandbox-note { background: #eef5f1; border: 1px solid #cfe3d8; border-left: 4px solid var(--green);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; font-size: .92rem; color: #2c4a3b; }
.sandbox-note strong { color: var(--green-dark); }
.chat { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
.chat-head { background: var(--green-dark); color: #fff; padding: 12px 16px; display: flex;
  align-items: center; gap: 10px; }
.chat-head .wa-avatar { width: 34px; height: 34px; }
.chat-head .who { font-weight: 600; font-size: .95rem; line-height: 1.1; }
.chat-head .status { font-size: .72rem; opacity: .85; }
.chat-log { padding: 16px 14px; background: var(--wa-bg);
  background-image: radial-gradient(rgba(0,0,0,.025) 1px, transparent 1px); background-size: 14px 14px;
  min-height: 300px; max-height: 52vh; overflow-y: auto; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 12px; margin-bottom: 10px; font-size: .9rem;
  line-height: 1.45; color: #111b21; box-shadow: 0 1px 1px rgba(0,0,0,.08); white-space: pre-wrap;
  word-wrap: break-word; }
.msg.user { background: var(--wa-out); border-top-right-radius: 3px; margin-left: auto; }
.msg.bot  { background: #fff; border-top-left-radius: 3px; margin-right: auto; }
.msg.bot .led, .msg.user .led { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem; }
.msg .typing span { display: inline-block; width: 6px; height: 6px; margin: 0 1px; border-radius: 50%;
  background: #9aa; animation: blink 1.2s infinite both; }
.msg .typing span:nth-child(2) { animation-delay: .2s; }
.msg .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-input input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px;
  font-size: 1rem; font-family: inherit; outline: none; }
.chat-input input:focus { border-color: var(--green); }
.chat-input button { border: 0; background: var(--green); color: #fff; width: 46px; height: 46px;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; }
.chat-input button:disabled { opacity: .5; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px auto 0; max-width: 640px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px;
  font-size: .84rem; color: var(--slate); cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--green); color: var(--green-dark); }
.demo-foot { max-width: 640px; margin: 18px auto 0; }

/* ---- contact ---- */
.contact-cards { display: grid; gap: 16px; margin-top: 10px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow); }
.contact-card .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--green-soft);
  display: grid; place-items: center; color: var(--green-dark); flex: none; }
.contact-card h3 { font-size: 1.02rem; margin: 2px 0 4px; }
.contact-card p { margin: 0; font-size: .94rem; }
@media (min-width: 720px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
