/* =========================================================
   AFRICDEV — Corporate Stylesheet (v5)
   ========================================================= */

:root {
    color-scheme: light only;
    --green: #4CAF50;
    --green-dark: #3E8E41;
    --blue: #1E4C9A;
    --blue-dark: #163A78;
    --ink: #1a1f2b;
    --grey: #5a6270;
    --light-grey: #8a92a3;
    --line: #e6e9ef;
    --bg: #ffffff;
    --bg-soft: #f7f9fc;
    --bg-tint: #f2f6ff;
    --radius: 14px;
    --shadow: 0 10px 40px rgba(30, 76, 154, 0.08);
    --shadow-sm: 0 4px 18px rgba(30, 76, 154, 0.06);
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: #ffffff !important;
    color-scheme: light only;
    forced-color-adjust: none;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: #ffffff !important;
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    color-scheme: light only;
    forced-color-adjust: none;
    isolation: isolate;
}

/* Firefox iOS dark-mode guard */
@media (prefers-color-scheme: dark) {
    html, body {
        background: #ffffff !important;
        color: var(--ink) !important;
    }
    .card { background: #ffffff !important; }
    .section { background: #ffffff !important; }
    .section-soft { background: #f7f9fc !important; }
    .section-tint { background: #f2f6ff !important; }
    .page-hero, .hero { background: #ffffff !important; }
    .site-header { background: #ffffff !important; }
}

img { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--green); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { color: var(--grey); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff !important;
    border-bottom: 1px solid var(--line);
    transition: box-shadow .3s ease;
}

.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-logo { height: 46px; width: auto; flex-shrink: 0; }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--blue);
    letter-spacing: 0.02em;
}

.brand-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--green);
    font-weight: 500;
}

/* ---------- Nav ---------- */
.main-nav { display: flex; align-items: center; gap: 34px; }

.main-nav a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.02em;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--green);
    transition: width .25s ease;
}

.main-nav a:hover { color: var(--blue); }
.main-nav a:hover::after { width: 100%; }

.nav-cta {
    background: var(--blue);
    color: #ffffff !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 500 !important;
    transition: background .25s ease, transform .25s ease;
}

.nav-cta:hover { background: var(--green); transform: translateY(-1px); }
.nav-cta::after { display: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: .3s; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all .25s ease;
    cursor: pointer;
    border: none;
}

.btn-primary { background: var(--blue); color: #ffffff; }
.btn-primary:hover {
    background: var(--green);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.25);
}

.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #ffffff; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; background: #ffffff; }
.section-soft { background: var(--bg-soft) !important; }
.section-tint { background: var(--bg-tint) !important; }

.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 600;
    margin-bottom: 16px;
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--green);
    vertical-align: middle;
    margin-right: 10px;
    transform: translateY(-3px);
}

.section-head h2 { margin-bottom: 18px; }
.section-head p { font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 120px 0 100px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 70px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 { margin-bottom: 24px; color: var(--ink); }
.hero-text h1 .accent { color: var(--green); font-style: italic; }
.hero-text p { font-size: 1.12rem; margin-bottom: 36px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-image { position: relative; border-radius: var(--radius); overflow: hidden; }

/* ---------- Image blending ---------- */
.fade-corners {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: transparent;
}

.fade-corners img { width: 100%; display: block; }

.fade-corners::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.85) 0%, transparent 35%),
        radial-gradient(circle at top right, rgba(255,255,255,0.85) 0%, transparent 35%),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.85) 0%, transparent 35%),
        radial-gradient(circle at bottom right, rgba(255,255,255,0.85) 0%, transparent 35%);
}

.section-soft .fade-corners::after {
    background:
        radial-gradient(circle at top left, rgba(247,249,252,0.9) 0%, transparent 35%),
        radial-gradient(circle at top right, rgba(247,249,252,0.9) 0%, transparent 35%),
        radial-gradient(circle at bottom left, rgba(247,249,252,0.9) 0%, transparent 35%),
        radial-gradient(circle at bottom right, rgba(247,249,252,0.9) 0%, transparent 35%);
}

.section-tint .fade-corners::after {
    background:
        radial-gradient(circle at top left, rgba(242,246,255,0.9) 0%, transparent 35%),
        radial-gradient(circle at top right, rgba(242,246,255,0.9) 0%, transparent 35%),
        radial-gradient(circle at bottom left, rgba(242,246,255,0.9) 0%, transparent 35%),
        radial-gradient(circle at bottom right, rgba(242,246,255,0.9) 0%, transparent 35%);
}

/* ---------- Card grids ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 38px 32px;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 0;
    background: linear-gradient(180deg, var(--green), var(--blue));
    transition: height .35s ease;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { height: 100%; }

.card h3 { margin-bottom: 14px; font-size: 1.25rem; color: var(--ink); }
.card p { font-size: 0.97rem; }

/* ---------- Two-column feature ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.feature.reverse { direction: rtl; }
.feature.reverse > * { direction: ltr; }
.feature-text h2 { margin-bottom: 20px; }
.feature-text p { margin-bottom: 16px; }
.feature-img { border-radius: var(--radius); overflow: hidden; position: relative; }

/* ---------- Footer ---------- */
.site-footer {
    background: #0e1830 !important;
    color: #b6bece;
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 50px;
    padding-bottom: 60px;
}

.footer-logo-wrap {
    display: inline-block;
    background: #ffffff !important;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.footer-logo {
    height: 56px !important;
    width: auto !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-tagline { font-size: 0.92rem; color: #8a94a8; max-width: 280px; }

.footer-col h4 {
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col a, .footer-col p {
    display: block;
    color: #a8b0c2;
    font-size: 0.92rem;
    margin-bottom: 10px;
    transition: color .2s ease;
}

.footer-col a:hover { color: var(--green); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 24px 0; }
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #6f7a92;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }

/* ---------- Page hero ---------- */
.page-hero {
    background: linear-gradient(180deg, #ffffff 0%, #f2f6ff 100%);
    padding: 90px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero h1 { margin-bottom: 16px; }
.page-hero p { max-width: 620px; margin: 0 auto; font-size: 1.08rem; }

/* ---------- Animations ---------- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---------- Forms ---------- */
input, textarea, button, select { font-family: var(--font-body); }
input:focus, textarea:focus {
    outline: none;
    border-color: var(--blue) !important;
    background: #ffffff !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
    .hero-inner, .feature { grid-template-columns: 1fr; gap: 50px; }
    .feature.reverse { direction: ltr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 70px 0; }
    .hero { padding: 80px 0 60px; }
    .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }

    .brand-logo { height: 40px; }
    .brand-name { font-size: 1.15rem; }
    .brand-tag { font-size: 0.62rem; letter-spacing: 0.12em; display: block; }

    /* Mobile nav panel */
    .main-nav {
        position: fixed;
        top: 0; right: -100%;
        height: 100vh;
        width: 280px;
        background: #ffffff !important;
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        box-shadow: -10px 0 40px rgba(0,0,0,0.08);
        transition: right .35s ease;
        z-index: 200;
    }

    /* Full-screen translucent backdrop behind open menu */
    .main-nav::before {
        content: "";
        position: fixed;
        top: 0; left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 22, 40, 0.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity .35s ease;
        z-index: -1;
    }

    .main-nav.open { right: 0; }
    .main-nav.open::before { opacity: 1; pointer-events: auto; }

    .nav-toggle { display: flex; }

    .footer-grid { grid-template-columns: 1fr; gap: 34px; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 380px) {
    .brand-logo { height: 36px; }
    .brand-name { font-size: 1rem; }
    .brand-tag { font-size: 0.58rem; letter-spacing: 0.1em; }
}