/* Home app: public homepage and services page (gold theme). Separate from tlapp/style.css. */
.mk-body, .mk-body *, .mk-body *::before, .mk-body *::after { box-sizing: border-box; }
/* Colours: light by default; dark follows the device, or a signed-in user's own Light/Dark choice */
.mk-body {
    --mk-bg: #fffdf8; --mk-text: #1f1b16; --mk-muted: #6b6456;
    --mk-card: #fff8e8; --mk-card-line: rgba(242, 179, 61, .4); --mk-line: rgba(242, 179, 61, .35);
    --mk-soft: #fff3d6; --mk-gold-text: #c98f1f; --mk-shadow: rgba(31, 27, 22, .08);
    --mk-cta-bg: #1f1b16; --mk-cta-line: transparent; --mk-cta-btn: #fff; --mk-footer-bg: #1f1b16;
    --mk-btn-bg: #f2b33d; --mk-btn-line: #f2b33d; --mk-tile-bg: #f2b33d; --mk-tile-line: transparent; --mk-tile-ink: #1f1b16; --mk-chip-bg: #f2b33d;
    --ge-ink: #101F46;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .mk-body {
        --mk-bg: #14110c; --mk-text: #f3eee4; --mk-muted: #b3ab9c;
        --mk-card: #1f1a12; --mk-card-line: rgba(242, 179, 61, .28); --mk-line: rgba(242, 179, 61, .2);
        --mk-soft: rgba(242, 179, 61, .1); --mk-gold-text: #dcae5c; --mk-shadow: rgba(0, 0, 0, .4);
        --mk-cta-bg: #221c13; --mk-cta-line: rgba(242, 179, 61, .3); --mk-cta-btn: #c99a45; --mk-footer-bg: #0d0b08;
        --mk-btn-bg: #c99a45; --mk-btn-line: rgba(242, 179, 61, .5); --mk-tile-bg: rgba(242, 179, 61, .12); --mk-tile-line: rgba(242, 179, 61, .28); --mk-tile-ink: #e3b65e; --mk-chip-bg: #2a2216;
        --ge-ink: #FFFFFF;
        color-scheme: dark;
    }
}
html[data-theme="dark"] .mk-body {
    --mk-bg: #14110c; --mk-text: #f3eee4; --mk-muted: #b3ab9c;
    --mk-card: #1f1a12; --mk-card-line: rgba(242, 179, 61, .28); --mk-line: rgba(242, 179, 61, .2);
    --mk-soft: rgba(242, 179, 61, .1); --mk-gold-text: #dcae5c; --mk-shadow: rgba(0, 0, 0, .4);
    --mk-cta-bg: #221c13; --mk-cta-line: rgba(242, 179, 61, .3); --mk-cta-btn: #c99a45; --mk-footer-bg: #0d0b08;
    --mk-btn-bg: #c99a45; --mk-btn-line: rgba(242, 179, 61, .5); --mk-tile-bg: rgba(242, 179, 61, .12); --mk-tile-line: rgba(242, 179, 61, .28); --mk-tile-ink: #e3b65e; --mk-chip-bg: #2a2216;
    --ge-ink: #FFFFFF;
    color-scheme: dark;
}

.mk-body { margin: 0; background: var(--mk-bg); color: var(--mk-text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

.mk-header { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(20px, 5vw, 64px); background: var(--mk-bg); border-bottom: 1px solid var(--mk-line); }
.mk-logo { display: flex; align-items: center; gap: 12px; color: var(--mk-text); text-decoration: none; }
.mk-logo-line { width: 1.5px; height: 24px; background: var(--mk-text); opacity: .35; }
.ge-word { display: block; flex: 0 0 auto; }

/* Gistiva Enterprise "GE" mark: ink swaps with light/dark mode, accent stays brand turquoise */
.ge-mark { flex: 0 0 auto; display: block; }
.ge-mark .ge-ink { fill: var(--ge-ink); }
.ge-mark .ge-accent { fill: #08C9C2; }
.mk-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.mk-nav-link { font-weight: 600; font-size: 0.9375rem; color: var(--mk-text); text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.mk-nav-link:hover, .mk-nav-link.is-active { border-bottom-color: #f2b33d; font-weight: 700; }
.mk-burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; border-radius: 10px; color: var(--mk-text); cursor: pointer; }
.mk-burger svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mk-burger .x { display: none; }
.mk-burger[aria-expanded="true"] .x { display: block; }
.mk-burger[aria-expanded="true"] .bars { display: none; }
@media (max-width: 760px) {
    .mk-header { flex-wrap: wrap; }
    .mk-burger { display: inline-flex; }
    .mk-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px 0 4px; }
    .mk-nav.is-open { display: flex; }
    .mk-nav-link { padding: 12px 4px; border-bottom: 1px solid var(--mk-line); }
    .mk-nav .mk-btn { margin-top: 8px; }
}

.mk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 1rem; border-radius: 999px; padding: 14px 28px; text-decoration: none; cursor: pointer; transition: transform .15s ease; }
.mk-btn:hover { transform: translateY(-1px); }
.mk-btn-primary { background: var(--mk-btn-bg); color: #1f1b16; }
.mk-btn-outline { background: transparent; color: var(--mk-text); border: 2px solid var(--mk-btn-line); }
.mk-btn-sm { padding: 10px 22px; font-size: 0.875rem; }

.mk-hero { padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 72px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.mk-eyebrow { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 700; font-size: 0.8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mk-gold-text); background: var(--mk-soft); padding: 8px 16px; border-radius: 999px; }
.mk-hero h1 { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 800; font-size: clamp(32px, 5vw, 52px); line-height: 1.15; margin: 0; max-width: 780px; }
.mk-hero p { font-size: clamp(16px, 2vw, 19px); color: var(--mk-muted); max-width: 600px; line-height: 1.6; margin: 0; }
.mk-hero-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 8px; }

.mk-pillars, .mk-services { padding: 0 clamp(20px, 5vw, 64px) clamp(56px, 7vw, 88px); display: flex; flex-wrap: wrap; gap: 24px; max-width: 1040px; margin: 0 auto; }
.mk-pillar-card, .mk-svc-card { flex: 1 1 380px; min-width: 280px; display: flex; flex-direction: column; gap: 16px; background: var(--mk-card); border: 1px solid var(--mk-card-line); border-radius: 16px; padding: 32px; color: var(--mk-text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.mk-pillar-card:hover, .mk-svc-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--mk-shadow); }
.mk-pillar-icon, .mk-svc-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--mk-tile-bg); border: 1px solid var(--mk-tile-line); display: flex; align-items: center; justify-content: center; }
.mk-pillar-icon svg, .mk-svc-icon svg { stroke: var(--mk-tile-ink); }
.mk-pillar-card h2, .mk-svc-card h2 { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 700; font-size: 1.375rem; margin: 0; }
.mk-pillar-card p, .mk-svc-card p { font-size: 0.9375rem; color: var(--mk-muted); line-height: 1.6; margin: 0; }
.mk-pillar-more { font-weight: 700; font-size: 0.875rem; color: var(--mk-gold-text); display: inline-flex; align-items: center; gap: 6px; margin-top: auto; }

.mk-svc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mk-svc-list li { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--mk-text); }
.mk-svc-list li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--mk-soft); box-shadow: inset 0 0 0 1px var(--mk-btn-line); }

.mk-trust { padding: 0 clamp(20px, 5vw, 64px) clamp(56px, 7vw, 88px); }
.mk-trust-row { max-width: 1040px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; border-top: 1px solid var(--mk-line); padding-top: 40px; }
.mk-trust-item { flex: 1 1 220px; display: flex; gap: 14px; align-items: flex-start; }
.mk-trust-icon { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--mk-soft); display: flex; align-items: center; justify-content: center; }
.mk-trust-item strong { font-weight: 700; font-size: 0.9375rem; }
.mk-trust-item p { font-size: 0.8125rem; color: var(--mk-muted); margin: 4px 0 0; line-height: 1.5; }

.mk-cta-wrap { padding: 0 clamp(20px, 5vw, 64px) clamp(56px, 7vw, 80px); }
.mk-cta { max-width: 1040px; margin: 0 auto; background: var(--mk-cta-bg); border: 1px solid var(--mk-cta-line); color: #fffdf8; border-radius: 24px; padding: clamp(32px, 5vw, 56px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.mk-cta h2 { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 800; font-size: clamp(22px, 3vw, 30px); margin: 0; }
.mk-cta p { font-size: 0.9375rem; color: #dcd6c8; max-width: 480px; line-height: 1.6; margin: 0; }
.mk-cta .mk-btn-primary { background: var(--mk-cta-btn); color: #1f1b16; }

.mk-footer { background: var(--mk-footer-bg); color: #fffdf8; padding: 40px clamp(20px, 5vw, 64px); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.mk-footer-brand { flex: 1 1 240px; }
.mk-footer-brand p { font-size: 0.8125rem; color: #b8b2a6; margin: 8px 0 0; max-width: 280px; line-height: 1.6; }
.mk-footer-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.mk-footer-col { display: flex; flex-direction: column; gap: 10px; }
.mk-footer-col span { font-weight: 700; font-size: 0.8125rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mk-gold-text); }
.mk-footer-col a { font-size: 0.875rem; color: #dcd6c8; text-decoration: none; }

/* API integrations and payment consulting, with the phone illustration */
.mk-api-wrap { padding: 0 clamp(20px, 5vw, 64px) clamp(56px, 7vw, 88px); }
.mk-api { max-width: 1040px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 32px; background: var(--mk-card); border: 1px solid var(--mk-card-line); border-radius: 16px; padding: clamp(24px, 4vw, 40px); }
.mk-api-copy { flex: 1 1 420px; min-width: 260px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.mk-api-copy h2 { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 700; font-size: 1.375rem; margin: 0; }
.mk-api-copy > p { font-size: 0.9375rem; color: var(--mk-muted); line-height: 1.6; margin: 0; }
.mk-api-advice { width: 100%; background: var(--mk-soft); border-left: 3px solid var(--mk-btn-line); border-radius: 10px; padding: 14px 16px; }
.mk-api-advice strong { font-size: 0.9375rem; }
.mk-api-advice p { font-size: 0.875rem; color: var(--mk-muted); line-height: 1.6; margin: 6px 0 0; }
.mk-api-art { flex: 1 1 280px; min-width: 240px; display: flex; justify-content: center; }
.mk-api-svg { width: 100%; max-width: 320px; height: auto; overflow: visible; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* The phone shows a real-looking M-Pesa PIN pop-up, so its screen keeps phone colours in light and dark */
.mk-api-svg .a-phone { fill: #1b1b1f; stroke: var(--mk-card-line); stroke-width: 2; }
.mk-api-svg .a-screen { fill: #f4f5f7; }
.mk-api-svg .a-app-bar { fill: #e3e5ea; }
.mk-api-svg .a-app-line { fill: #dfe2e7; }
.mk-api-svg .a-status { font-size: 0.5625rem; font-weight: 600; fill: #1b1b1f; }
.mk-api-svg .a-status-icons { fill: #1b1b1f; }
.mk-api-svg .a-dim { fill: rgba(0, 0, 0, .45); }
.mk-api-svg .a-dialog { fill: #ffffff; }
.mk-api-svg .a-dlg { font-size: 0.5625rem; fill: #202124; }
.mk-api-svg .a-dlg-strong { font-weight: 700; }
.mk-api-svg .a-input { stroke: #0b7a75; stroke-width: 1.5; }
.mk-api-svg .a-pin-dot { fill: #202124; }
.mk-api-svg .a-btn { font-size: 0.5625rem; font-weight: 700; letter-spacing: .04em; fill: #0b7a75; }
.mk-api-svg .a-note { fill: #ffffff; stroke: rgba(0, 0, 0, .08); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); }
.mk-api-svg .a-note-icon { fill: #0b7a75; }
.mk-api-svg .a-note-mark { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mk-api-svg .a-note-app { font-size: 0.5rem; fill: #5f6368; }
.mk-api-svg .a-note-text { font-size: 0.5625rem; fill: #202124; }
.mk-api-svg .a-badge { fill: var(--mk-chip-bg); stroke: var(--mk-tile-line); }
.mk-api-svg .a-badge-mark { fill: none; stroke: var(--mk-tile-ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.mk-api-svg .a-chip { fill: var(--mk-chip-bg); stroke: var(--mk-tile-line); }
.mk-api-svg .a-chip-text { font-size: 0.6875rem; font-weight: 700; fill: var(--mk-tile-ink); }
.mk-api-svg .a-chip-sub { font-size: 0.625rem; fill: var(--mk-tile-ink); }
.mk-api-svg .a-c2b { fill: var(--mk-gold-text); }

/* ---------- Instant pages (see tlapp/static/tlapp/instant.js) ---------- */
/* The page colour fills the whole window, so nothing white shows while a page swaps in */
html:has(> .mk-body) { background: #fffdf8; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]):has(> .mk-body) { background: #14110c; } }
html[data-theme="dark"]:has(> .mk-body) { background: #14110c; }
/* The header stays put; only the page below it cross-fades */
.mk-header { view-transition-name: tl-mk-head; }
@media (prefers-reduced-motion: no-preference) {
    html.tl-swap::view-transition-old(root) { animation: 120ms ease-out both tl-xfade-out; }
    html.tl-swap::view-transition-new(root) { animation: 160ms ease-in both tl-xfade-in; }
}
@keyframes tl-xfade-out { to { opacity: 0; } }
@keyframes tl-xfade-in { from { opacity: 0; } }
.htmx-indicator { display: none !important; }
