/*
style.css
=========
Design intent (so future-you doesn't have to reverse-engineer it):
Kasi Rates is aimed at people sending money home from South African
townships and cities — the palette leans warm and market-like (ochre,
deep teal, paper background) rather than generic fintech blue-and-white.
System fonts only, deliberately: the brief calls for a fast, low-weight
mobile site, and a Google Fonts request on every page load works against
that on the exact mobile data connections most senders will be on.
*/

:root {
    --bg: #faf6ef;
    --ink: #241d14;
    --muted: #6b6154;
    --line: #e4ddcf;
    --teal: #0b4f4a;
    --teal-dark: #083b37;
    --gold: #d99a2b;
    --gold-dark: #b87c15;
    --sage: #4f7358;
    --sage-bg: #eaf1ea;
    --danger: #a3402f;
    --danger-bg: #fbeeea;
    --radius: 10px;
    --max-width: 520px;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: var(--teal);
}

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 18px 48px;
}

/* ---- header ------------------------------------------------------ */

.site-header {
    display: flex;
    flex-direction: column;
    padding: 14px 18px 0;
    border-bottom: 2px solid var(--ink);
    margin: 0 -18px 22px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
}

.site-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
}

.site-header .wordmark {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-header .wordmark img {
    display: block;
    height: 38px;
    width: auto;
}

.tagline {
    font-size: 13px;
    color: var(--muted);
}

/* ---- nav menu + anchor scroll offset ------------------------------------------------------ */

.nav-menu {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    font-size: 13.5px;
}

.nav-link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    margin-right: 20px;
}

.nav-link:last-child {
    margin-right: 0;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--teal);
}

.nav-dropdown {
    position: relative;
    margin-right: 20px;
}

.nav-dropdown summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-dropdown summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown summary::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--ink);
    margin-top: 2px;
}

.nav-dropdown[open] summary::after {
    transform: rotate(180deg);
    margin-top: -2px;
}

.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 6px;
    min-width: 160px;
    box-shadow: 0 10px 24px rgba(36, 29, 20, 0.18);
    z-index: 60;
}

.nav-dropdown-panel a {
    display: block;
    padding: 7px 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-dropdown-panel a:hover,
.nav-dropdown-panel a:focus-visible {
    background: var(--bg);
    color: var(--teal);
}

#calculator,
#how-it-works,
#faq {
    scroll-margin-top: 118px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--teal);
    color: #fff;
    padding: 10px 16px;
    z-index: 100;
    border-radius: 0 0 8px 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.skip-link:focus {
    left: 0;
}

/*---- mobile nav -------------------------------------------------------- */

.mobile-nav {
    position: relative;
}

.mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    list-style: none;
}

.mobile-nav-toggle::-webkit-details-marker {
    display: none;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
}

.mobile-nav-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 10px 24px rgba(36, 29, 20, 0.18);
    z-index: 60;
    display: flex;
    flex-direction: column;
}

.mobile-nav-panel a {
    display: block;
    padding: 9px 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 6px;
}

.mobile-nav-panel a:hover,
.mobile-nav-panel a:focus-visible {
    background: var(--bg);
    color: var(--teal);
}

.desktop-nav {
    display: none;
}

@media (min-width: 680px) {
    .mobile-nav {
        display: none;
    }

    .desktop-nav {
        display: flex;
    }
}

/* ---- hero illustration ---------------------------------------------- */

.hero-illustration {
    margin: 0 0 24px;
    line-height: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-illustration img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- form ---------------------------------------------------------- */

/* A solid white card behind the form — deliberate separation from a
   colourful photo hero above it, so the inputs read clearly regardless
   of what's going on in the image. Border matches the same --line token
   used elsewhere, just on white rather than the page's cream --bg, so it
   still feels like part of the same design rather than a bolted-on box. */
.form-card {
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 18px 20px;
}

h1 {
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.lede {
    color: var(--muted);
    margin: 0 0 28px;
    max-width: 46ch;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field .hint {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

input[type="number"],
select {
    width: 100%;
    padding: 13px 14px;
    font-size: 16px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    appearance: none;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(11, 79, 74, 0.15);
}

.amount-field {
    position: relative;
}

.amount-field .prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-weight: 600;
    pointer-events: none;
}

.amount-field input {
    padding-left: 40px;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    color: #fff;
    background: var(--teal);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
    background: var(--teal-dark);
}

.btn:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.error-banner {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ---- results -------------------------------------------------------- */

.results-summary {
    margin-bottom: 20px;
}

.results-summary .amount-line {
    font-size: 15px;
    color: var(--muted);
}

.results-summary .amount-line strong {
    color: var(--ink);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 16px 16px 18px;
    border: 1.5px solid var(--line);
    border-left: 5px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    margin-bottom: 12px;
}

.result-row.is-best {
    border-left-color: var(--gold);
}

.result-row.is-stale {
    opacity: 0.72;
}

.result-main {
    min-width: 0;
}

.result-provider {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 0;
}

.provider-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-right: 8px;
    flex-shrink: 0;
}

.result-meta {
    font-size: 13.5px;
    color: var(--muted);
}

.best-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--teal-dark);
    background: var(--sage-bg);
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 8px;
}

.stale-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--danger);
    margin-top: 4px;
}

.result-amount {
    text-align: right;
    flex-shrink: 0;
}

.result-amount .receive-figure {
    font-size: 19px;
    font-weight: 800;
    white-space: nowrap;
}

.result-amount .receive-label {
    font-size: 12px;
    color: var(--muted);
}

.provider-cta {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
    text-decoration: none;
    white-space: nowrap;
}

.provider-cta:hover,
.provider-cta:focus-visible {
    color: var(--teal-dark);
    text-decoration: underline;
}

.no-results {
    color: var(--muted);
    padding: 24px 0;
}

.disclaimer {
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 16px;
    margin-top: 24px;
}

.updated-line {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 6px;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* ---- policy page card ------------------------------------------------ */

.policy-card h2 {
    font-size: 17px;
    margin: 22px 0 8px;
}

.policy-card h2:first-child {
    margin-top: 0;
}

.policy-card p {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.65;
    margin: 0 0 4px;
}

/* ---- how it works ----------------------------------------------------- */

.section-heading {
    font-size: 21px;
    letter-spacing: -0.01em;
    margin: 44px 0 18px;
}

.how-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}

.how-image-slot {
    aspect-ratio: 4 / 3;
    background: var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}

.how-image-slot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.how-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 8px;
}

.how-title {
    font-size: 16px;
    margin: 2px 0 6px;
}

.how-text {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    line-height: 1.55;
}

/* ---- faq --------------------------------------------------------------- */

.faq-item {
    border-bottom: 1px solid var(--line);
    padding: 15px 0;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    list-style: none;
    position: relative;
    padding-right: 26px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 2px;
    top: -2px;
    font-size: 20px;
    font-weight: 400;
    color: var(--muted);
}

.faq-item[open] summary::after {
    content: "\2212"; /* minus sign */
}

.faq-item p {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.65;
}

/* ---- common amounts table --------------------------------------------- */

.common-amounts-note {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0 0 16px;
    max-width: 52ch;
}

.common-amounts-scroll {
    overflow-x: auto;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.common-amounts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    white-space: nowrap;
}

.common-amounts-table th,
.common-amounts-table td {
    text-align: left;
    padding: 12px 14px;
}

.common-amounts-table thead th {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    border-bottom: 1.5px solid var(--line);
    font-weight: 700;
}

.common-amounts-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--line);
}

.common-amounts-table tbody td:first-child {
    font-weight: 700;
}

.table-avatar-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.table-no-data {
    color: var(--muted);
    font-style: italic;
}

/* ---- footer ------------------------------------------------------------ */

.site-footer {
    background: var(--teal-dark);
    border-top: 4px solid var(--gold);
    margin-top: 56px;
    color: #e9e2d1;
}

.footer-wrap {
    padding: 34px 18px 26px;
}

.footer-wordmark {
    display: inline-flex;
    align-items: center;
    margin-bottom: 26px;
}

.footer-wordmark img {
    display: block;
    height: 34px;
    width: auto;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    margin-bottom: 28px;
}

.footer-heading {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #c7bda0;
    margin: 0 0 10px;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #e9e2d1;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--gold);
    text-decoration: underline;
}

.footer-bottom-row {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 18px;
    display: flex;
    flex-direction: column-reverse;
    gap: 18px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-social a {
    color: #e9e2d1;
    display: inline-flex;
}

.footer-social a:hover,
.footer-social a:focus-visible {
    color: var(--gold);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #c7bda0;
    text-align: center;
}

.footer-credit {
    margin: 0 0 2px;
}

.footer-credit a {
    color: #e9e2d1;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
    color: var(--gold);
}

.footer-copyright,
.footer-updated {
    margin: 0;
}

@media (min-width: 560px) {
    .wrap {
        padding-top: 32px;
    }

    h1 {
        font-size: 30px;
    }
}

@media (min-width: 680px) {
    .how-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-columns {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-bottom-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

/* ---- back to top -------------------------------------------------------- */

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(36, 29, 20, 0.25);
    text-decoration: none;
    z-index: 40;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    background: var(--teal-dark);
}

/* ------------------------------------------------------------------------- */

.provider-note {
    font-size: 12.5px;
    color: var(--muted);
    font-style: italic;
    margin: 4px 0 0;
}