/*
 * Partner websites (Swap website now, Bingwa store next). One design; each partner's brand colour comes in as --brand.
 * Mobile first: most customers arrive on a phone from an SMS or WhatsApp link.
 */

:root {
    --brand: #059669;
    --brand-text: #ffffff;
    --brand-soft: color-mix(in srgb, var(--brand) 9%, #ffffff);
    --brand-strong: color-mix(in srgb, var(--brand) 82%, #000000);
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --page: #f8fafc;
    --danger: #b91c1c;
    --danger-soft: #fef2f2;
    --warning: #92400e;
    --warning-soft: #fffbeb;
    --radius: 16px;
    --shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 24px -12px rgb(15 23 42 / 0.12);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
    background: var(--page);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgb(255 255 255 / 0.92);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }

.brand { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { height: 2.25rem; width: auto; max-width: 10rem; object-fit: contain; }
.brand-mark {
    display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 10px;
    background: var(--brand); color: var(--brand-text); font-size: 0.95rem; font-weight: 800;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.8rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 650; font-size: 0.95rem; text-decoration: none; cursor: pointer;
    transition: transform 0.06s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: var(--brand-text); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-small { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn svg { width: 1.1rem; height: 1.1rem; flex: none; }

/* Hero */
.hero { padding: 2rem 0 1rem; }
.hero-grid { display: grid; gap: 1.5rem; align-items: start; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.75rem; border-radius: 999px;
    background: var(--brand-soft); color: var(--brand-strong); font-size: 0.8rem; font-weight: 650;
}
.hero h1 { margin: 0.75rem 0 0.5rem; font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; }
.hero .lead { margin: 0; color: var(--ink-2); font-size: 1.05rem; max-width: 34rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; padding: 0; list-style: none; }
.chips li {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-2);
}
.chips svg { width: 1rem; height: 1rem; color: var(--brand); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 1.25rem; }
.card-title { margin: 0 0 0.25rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.card-subtitle { margin: 0; color: var(--muted); font-size: 0.875rem; }

/* Form */
.field { margin-top: 1rem; }
.field label, .field-label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.9rem; }
.hint { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.8rem; }
.input {
    width: 100%; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
    font: inherit; font-size: 1rem; color: var(--ink);
}
.input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.input-group { position: relative; }
.input-group .input { padding-right: 4rem; }
.input-suffix { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.9rem; pointer-events: none; }

.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 0.4rem; padding: 0.3rem; background: var(--page); border: 1px solid var(--line); border-radius: 14px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
    display: block; margin: 0; padding: 0.6rem 0.5rem; border-radius: 10px; text-align: center; cursor: pointer;
    font-size: 0.875rem; font-weight: 600; color: var(--ink-2);
}
.segmented input:checked + label { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(15 23 42 / 0.12); }
.segmented input:focus-visible + label { outline: 2px solid var(--brand); }

.quick-amounts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.quick-amounts button {
    padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.quick-amounts button:hover { border-color: var(--brand); color: var(--brand-strong); }

.payout {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem;
    padding: 1rem; border-radius: 14px; background: var(--brand-soft);
}
.payout-label { font-size: 0.8rem; color: var(--ink-2); }
.payout-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.payout-rate { font-size: 0.8rem; color: var(--ink-2); text-align: right; }

.alert { margin: 0 0 1rem; padding: 0.8rem 1rem; border-radius: 12px; font-size: 0.9rem; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid #fde68a; }
.alert p { margin: 0; }

/* Sections */
.section { padding: 2.5rem 0 0.5rem; }
.section-head { margin-bottom: 1rem; }
.section-head h2 { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.section-head p { margin: 0.25rem 0 0; color: var(--muted); }
.grid-3 { display: grid; gap: 0.75rem; }

.step-number {
    display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: 0.75rem; border-radius: 999px;
    background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; font-size: 0.9rem;
}
.step h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.rate-figure { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.rate-figure small { font-size: 0.9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.rate-meta { margin: 0.5rem 0 0; color: var(--ink-2); font-size: 0.875rem; }
.pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 0.75rem; font-weight: 650; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 1.25rem 1rem; color: var(--ink-2); font-size: 0.925rem; }

.contact-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }

/* Order tracking */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.timeline li { position: relative; padding-top: 0.875rem; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.timeline li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 0.3rem; border-radius: 999px; background: var(--line); }
.timeline li.is-done { color: var(--ink); }
.timeline li.is-done::before { background: var(--brand); }
.timeline li.is-current::before { background: linear-gradient(90deg, var(--brand) 50%, var(--line) 50%); }

.dial-code {
    margin: 0.25rem 0 0; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: clamp(1.3rem, 6vw, 1.75rem);
    font-weight: 700; letter-spacing: 0.01em; word-break: break-all;
}
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.925rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.status-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 0.75rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); }
.status-icon svg { width: 1.5rem; height: 1.5rem; }
.status-icon.is-muted { background: var(--page); color: var(--muted); }

/* Footer */
.site-footer { margin-top: 3rem; padding: 2rem 0 2.5rem; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer strong { color: var(--ink); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Landing: the two swap forms side by side (stacked on phones) */
.landing-head { padding: 2rem 0 1.25rem; text-align: center; }
.landing-head h1 { margin: 0; font-size: clamp(1.6rem, 5.5vw, 2.4rem); line-height: 1.1; letter-spacing: -0.03em; }
.landing-head h1 span { color: var(--brand); }
.landing-head p { margin: 0.5rem auto 0; max-width: 36rem; color: var(--ink-2); }
.swap-forms { display: grid; gap: 1rem; align-items: stretch; }
/* Both swap cards are always the same height, with their buttons lined up at the bottom. */
.swap-card { display: flex; flex-direction: column; }
.swap-card > .card-body,
.swap-card form,
.swap-card .form-fieldset { display: flex; flex-direction: column; flex: 1; }
.swap-card .form-fieldset > .btn { margin-top: auto !important; }
.swap-card .form-fieldset > .payout { margin-bottom: 1rem; }
.swap-card .card-title { font-size: 1.2rem; }
.swap-card .card-title span { color: var(--brand); }

.network-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.5rem; margin-top: 1rem; padding: 0.4rem; border: 1px solid var(--line); border-radius: 16px; background: var(--page); }
.network-options input { position: absolute; opacity: 0; pointer-events: none; }
.network-options label {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0; padding: 0.85rem 2.25rem 0.85rem 0.75rem;
    border: 1.5px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 650; color: var(--ink-2);
}
.network-options label .tick {
    position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); display: none; place-items: center;
    width: 1.35rem; height: 1.35rem; border-radius: 999px; background: var(--brand); color: var(--brand-text);
}
.network-options label .tick svg { width: 0.8rem; height: 0.8rem; }
.network-options input:checked + label { background: var(--surface); border-color: var(--brand); color: var(--brand-strong); box-shadow: 0 1px 3px rgb(15 23 42 / 0.1); }
.network-options input:checked + label .tick { display: grid; }
.network-options input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.network-options input:disabled + label { cursor: not-allowed; color: var(--muted); opacity: 0.6; }
.network-options label small { font-size: 0.7rem; font-weight: 600; color: var(--muted); }

.form-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form-fieldset:disabled .affix, .form-fieldset:disabled .payout, .form-fieldset:disabled .rate-panel { opacity: 0.55; }
.form-fieldset:disabled .btn { opacity: 0.5; cursor: not-allowed; }
.network-dot { width: 0.6rem; height: 0.6rem; border-radius: 999px; flex: none; }

.rate-panel { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 14px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.rate-panel-icon { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 999px; background: color-mix(in srgb, var(--brand) 14%, #ffffff); color: var(--brand-strong); font-weight: 800; }
.rate-panel-text { flex: 1; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.rate-panel-value { font-size: 1.25rem; font-weight: 800; color: var(--brand-strong); font-variant-numeric: tabular-nums; }

.affix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.affix:focus-within { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.affix-label { display: grid; place-items: center; min-width: 3.25rem; padding: 0 0.75rem; border-right: 1px solid var(--line); background: var(--page); color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.affix-label svg { width: 1.1rem; height: 1.1rem; }
.affix input { flex: 1; min-width: 0; padding: 0.85rem 0.9rem; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--ink); }
.affix input:focus { outline: none; }

.swap-card.is-unavailable { opacity: 0.75; }

/* Header menu */
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav > a:not(.btn) { padding: 0.45rem 0.7rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.site-nav > a:not(.btn):hover { background: var(--page); color: var(--ink); }
.site-nav > a.is-active { background: var(--brand-soft); color: var(--brand-strong); }
.nav-whatsapp { margin-left: 0.25rem; }

/* Social buttons */
.social-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.social-link {
    display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; color: #ffffff;
    text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.social-link:hover { transform: translateY(-2px); box-shadow: 0 6px 14px -6px rgb(15 23 42 / 0.45); }
.social-link svg { width: 1.3rem; height: 1.3rem; }
.social-link.is-facebook { background: #1877f2; }
.social-link.is-whatsapp { background: #25d366; }
.social-link.is-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social-link.is-tiktok { background: #000000; }
.social-link.is-x { background: #0f172a; }
.social-link.is-youtube { background: #ff0000; }
.site-footer .social-link { width: 2.25rem; height: 2.25rem; }
.site-footer .social-link svg { width: 1.05rem; height: 1.05rem; }

/* The socials row under the two swap forms */
.socials-row { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin-top: 1.25rem; padding: 1.25rem; text-align: center; }
.socials-row p { margin: 0; font-weight: 650; color: var(--ink-2); }
.footer-links { display: flex; gap: 1rem; margin-top: 0.5rem; }

/* Contact */
.contact-grid { display: grid; gap: 0.75rem; }
.contact-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; text-decoration: none; }
.contact-card:hover { border-color: var(--brand); }
.contact-card strong { display: block; }
.contact-value { display: block; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.contact-card .hint { margin: 0; }
.contact-icon { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); }
.contact-icon svg { width: 1.4rem; height: 1.4rem; }

/* Get the app */
.app-install { display: flex; align-items: center; gap: 1rem; }
.app-icon { flex: none; width: 4.5rem; height: 4.5rem; border-radius: 1.1rem; box-shadow: var(--shadow); }
.grid-2 { display: grid; gap: 0.75rem; }
.install-steps { margin: 0.75rem 0 0; padding-left: 1.2rem; color: var(--ink-2); font-size: 0.925rem; }
.install-steps li + li { margin-top: 0.4rem; }

@media (max-width: 640px) {
    .site-nav > a:not(.btn) { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
    .nav-whatsapp span { display: none; }
    .nav-whatsapp { padding: 0.45rem; }
    .brand span:not(.brand-mark) { display: none; }
}

/* Bingwa store */
.store-tabs { display: flex; justify-content: center; gap: 0.4rem; width: max-content; max-width: 100%; margin: 0 auto 1.25rem; padding: 0.3rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.store-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.store-tabs label { padding: 0.5rem 1.1rem; border-radius: 999px; font-size: 0.9rem; font-weight: 650; color: var(--ink-2); cursor: pointer; }
.store-tabs input:checked + label { background: var(--brand); color: var(--brand-text); }
.store-tabs input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.bundle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.bundle-card .card-body { display: flex; flex-direction: column; gap: 0.25rem; height: 100%; }
.bundle-size { margin: 0.5rem 0 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.bundle-price { margin: 0 0 0.75rem; color: var(--brand-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.bundle-card .btn { margin-top: auto; }
.buy-dialog { width: min(28rem, calc(100vw - 2rem)); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 24px 48px -12px rgb(15 23 42 / 0.35); }
.buy-dialog::backdrop { background: rgb(15 23 42 / 0.45); }
.buy-head { display: flex; justify-content: space-between; gap: 1rem; }
.buy-close { width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: var(--page); font-size: 1.25rem; line-height: 1; color: var(--muted); cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.check-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }

.center-page { display: grid; place-items: center; min-height: 60vh; text-align: center; }
.center-page .card { max-width: 28rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
[hidden] { display: none !important; }

@media (min-width: 768px) {
    .hero { padding: 3.5rem 0 1.5rem; }
    .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .swap-forms { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .grid-2 { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .bundle-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
    .contact-grid { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
    .landing-head { padding: 3rem 0 1.75rem; }
    .card-body { padding: 1.5rem; }
}

/* Paybill instructions under the bundle cards */
.paybill-card { max-width: 32rem; margin: 1.5rem auto 0; }
.paybill-card .facts dd { font-weight: 500; }
.paybill-card .facts dd:first-of-type { font-weight: 700; font-size: 1.05rem; }
