/* ==========================================================================
   CSS VARIABLES (THEME TOKENS)
   ========================================================================== */
:root {
    --primary: #1565F6;
    --primary-hover: #0E4AC0;
    --success: #0CAF60;
    --success-bg: rgba(12, 175, 96, 0.1);

    /* Light Theme */
    --bg-color: #F8FAFC;
    --surface: #FFFFFF;
    --surface-hover: #F1F5F9;
    --border: #E2E8F0;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --grid-color: rgba(0, 0, 0, 0.04);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 30px -8px rgba(0, 0, 0, 0.08);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --nav-height: 76px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-color: #080B12;
    --surface: #10141D;
    --surface-hover: #161C28;
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --grid-color: rgba(255, 255, 255, 0.03);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; font-family: inherit; cursor: pointer; color: inherit; }
img { max-width: 100%; display: block; }

/* The Technical Grid Background */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center 15%, black 20%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center 15%, black 20%, transparent 85%);
}

.bg-glow {
    position: fixed;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 750px;
    height: 500px;
    background: radial-gradient(circle, rgba(21, 101, 246, 0.09) 0%, transparent 65%);
    z-index: -1;
    pointer-events: none;
}

/* UTILITIES */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-blue { color: var(--primary); }
.w-full { width: 100%; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; }
.justify-center { justify-content: center; }

/* ==========================================================================
   BUTTONS & APP STORE BADGES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition);
}

.btn-lg { padding: 15px 30px; font-size: 1rem; }

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(21, 101, 246, 0.25);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 246, 0.35);
}

.btn-outline {
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
    border-color: var(--text-main);
}

.btn-ghost {
    padding: 10px 18px;
    color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text-main); }

/* App Store Buttons */
.store-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--text-main);
    color: var(--bg-color);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.store-btn i { width: 22px; height: 22px; }
.store-btn-text { display: flex; flex-direction: column; text-align: left; }
.store-btn-text span { font-size: 0.625rem; opacity: 0.8; line-height: 1; }
.store-btn-text strong { font-size: 0.9375rem; font-weight: 600; line-height: 1.2; }
.store-btn.small { padding: 8px 14px; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition);
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    background: rgba(var(--bg-color), 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-wrapper {
    display: flex; justify-content: space-between; align-items: center; height: 100%;
}
.brand-logo { height: 32px; width: auto; }
[data-theme="dark"] .brand-logo { filter: brightness(0) invert(1); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-link {
    font-size: 0.9375rem; font-weight: 500; color: var(--text-muted);
    transition: color var(--transition);
}
.nav-link:hover { color: var(--text-main); }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.auth-buttons { display: flex; align-items: center; gap: 8px; }

.theme-btn {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text-muted); transition: background var(--transition);
}
.theme-btn:hover { background-color: var(--surface-hover); color: var(--text-main); }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.mobile-toggle { display: none; color: var(--text-main); }

/* ==========================================================================
   HERO SECTION & HEADLINE
   ========================================================================== */
.hero { padding: calc(var(--nav-height) + 48px) 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }

.trust-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; background-color: var(--surface);
    border: 1px solid var(--border); border-radius: 100px;
    font-size: 0.8125rem; font-weight: 600; margin-bottom: 24px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--success); }

/* Dynamic Headline with normal flow to prevent overlap */
.hero-headline {
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 24px;
    font-weight: 800;
}

#dynamic-headline {
    display: inline-block;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#dynamic-headline.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.hero-subtext {
    font-size: 1.125rem; color: var(--text-muted); margin-bottom: 36px; max-width: 520px;
}
.hero-cta-area { display: flex; flex-direction: column; gap: 24px; }
.primary-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* Real iOS App Mockup */
.hero-visual { position: relative; display: flex; justify-content: center; }
.ios-mockup-wrapper {
    position: relative;
    max-width: 380px;
    width: 100%;
}

.ambient-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(21, 101, 246, 0.2) 0%, transparent 70%);
    z-index: 0;
    filter: blur(40px);
}

.ios-app-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    border-radius: 36px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s ease;
}
.ios-mockup-wrapper:hover .ios-app-img {
    transform: translateY(-4px);
}

/* Floating Badges */
.float-chip {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}
.float-chip.chip-top { top: 12%; right: -25px; }
.float-chip.chip-bottom { bottom: 15%; left: -25px; animation-delay: 2.5s; }
.float-chip strong { display: block; font-size: 0.875rem; }
.float-chip span { font-size: 0.75rem; color: var(--text-muted); }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ==========================================================================
   TRUST METRICS
   ========================================================================== */
.trust-metrics { padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.metrics-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.metric-card { text-align: center; }
.metric-card h3 { font-size: 2.25rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.metric-card p { font-size: 0.875rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.metric-divider { width: 1px; height: 40px; background-color: var(--border); }

/* ==========================================================================
   PRODUCT SECTIONS
   ========================================================================== */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.product-grid.reverse { direction: rtl; }
.product-grid.reverse > * { direction: ltr; }

.product-tag {
    display: inline-flex; font-size: 0.75rem; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px;
}
.section-title { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px; }
.section-desc { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 24px; }

.feature-bullets { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.feature-bullets li { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 0.9375rem; }
.feature-bullets i { width: 18px; height: 18px; color: var(--primary); }

/* Preview UI Cards */
.product-card-preview {
    background-color: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-lg); max-width: 420px; margin: 0 auto;
}
.card-preview-header { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 24px; }
.status-live { font-size: 0.75rem; background: var(--success-bg); color: var(--success); padding: 4px 10px; border-radius: 100px; }
.calc-row label { display: block; font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 6px; }
.calc-box { border: 1px solid var(--border); padding: 14px; border-radius: var(--radius-sm); font-size: 1.5rem; font-weight: 700; }
.calc-divider { text-align: center; margin: 12px 0; color: var(--primary); }

/* Virtual Card forced dark mode section */
.dark-section { background-color: #080B12; color: #F8FAFC; position: relative; }
.dark-section .section-desc { color: #94A3B8; }
.dark-section .feature-bullets i { color: #1565F6; }

.vcard-preview-wrapper { position: relative; display: flex; justify-content: center; }
.vcard-ui {
    width: 360px; height: 220px; border-radius: 16px; padding: 24px;
    background: linear-gradient(135deg, #1565F6, #09347A); color: white;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5); display: flex; flex-direction: column; justify-content: space-between;
}
.vcard-top { display: flex; justify-content: space-between; align-items: center; }
.vcard-logo { height: 20px; filter: brightness(0) invert(1); }
.vcard-badge { font-size: 0.6875rem; letter-spacing: 0.1em; opacity: 0.7; }
.vcard-chip { width: 40px; height: 28px; background: rgba(255,255,255,0.3); border-radius: 4px; }
.vcard-number { font-family: monospace; font-size: 1.25rem; letter-spacing: 0.1em; }
.vcard-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.vcard-bottom small { font-size: 0.625rem; opacity: 0.7; display: block; }
.vcard-bottom p { font-size: 0.875rem; font-weight: 600; }
.vcard-network { width: 32px; height: 20px; position: relative; }
.vcard-network::before, .vcard-network::after { content:''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.6); }
.vcard-network::after { right: 0; background: rgba(255,255,255,0.85); }

.vcard-toast {
    position: absolute; bottom: -20px; right: 0; background-color: #1A212E; border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 12px 18px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 12px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.4);
}
.vcard-toast i { color: var(--success); }
.vcard-toast strong { display: block; font-size: 0.875rem; }
.vcard-toast span { font-size: 0.75rem; color: #94A3B8; }

/* Cheap Data Cards Preview */
.data-preview-grid { display: grid; gap: 16px; max-width: 400px; margin: 0 auto; }
.data-card {
    background-color: var(--surface); border: 1px solid var(--border);
    padding: 20px; border-radius: var(--radius-md); display: flex;
    justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm);
}
.data-card.active { border-color: var(--primary); background-color: rgba(21, 101, 246, 0.03); }
.network-badge { font-size: 0.6875rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 6px;}
.network-badge.mtn { background: #FFCC00; color: #000; }
.network-badge.airtel { background: #ED1C24; color: #FFF; }
.network-badge.glo { background: #2E8540; color: #FFF; }
.data-validity { font-size: 0.75rem; color: var(--text-muted); }
.data-price { font-size: 1.375rem; font-weight: 800; color: var(--primary); }

/* ==========================================================================
   HOW IT WORKS & FAQ
   ========================================================================== */
.how-it-works-bg { background-color: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-card { text-align: center; }
.step-icon {
    width: 48px; height: 48px; border-radius: 50%; background-color: var(--primary); color: white;
    font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.125rem;
}
.step-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.step-card p { font-size: 0.9375rem; color: var(--text-muted); }

.faq-container { max-width: 760px; }
.accordion { border-top: 1px solid var(--border); }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-trigger {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 24px 0; font-size: 1.125rem; font-weight: 600; text-align: left;
}
.acc-icon { width: 20px; height: 20px; transition: transform var(--transition); color: var(--text-muted); }
.acc-trigger[aria-expanded="true"] .acc-icon { transform: rotate(180deg); color: var(--primary); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height var(--transition); }
.acc-body p { padding-bottom: 24px; color: var(--text-muted); }

/* ==========================================================================
   FINAL CTA & FOOTER
   ========================================================================== */
.final-cta {
    padding: 110px 0; border-top: 1px solid var(--border);
    background: radial-gradient(circle at center, rgba(21, 101, 246, 0.05) 0%, transparent 70%);
}
.final-cta-buttons { display: flex; justify-content: center; gap: 16px; margin-top: 32px; flex-wrap: wrap;}

.footer { padding: 80px 0 40px; border-top: 1px solid var(--border); background-color: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; margin-bottom: 48px; }
.footer-text { color: var(--text-muted); font-size: 0.9375rem; max-width: 300px; }

/* Compliance Badge */
.compliance-badge {
    background-color: var(--bg-color);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-sm);
    max-width: 320px;
}
.compliance-logos { margin-bottom: 12px; display: flex; align-items: center; }
.cac-logo { height: 32px; width: auto; object-fit: contain; }
.cac-fallback { display: none; align-items: center; gap: 6px; font-weight: 700; color: var(--text-main); font-size: 0.875rem;}
.cac-fallback i { color: var(--success); }
.compliance-text { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

.footer-col h4 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 20px; }
.footer-col a { display: block; color: var(--text-muted); margin-bottom: 12px; font-size: 0.9375rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--primary); }
.footer-stores { display: flex; flex-direction: column; gap: 10px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.875rem; color: var(--text-muted); flex-wrap: wrap; gap: 16px;}
.footer-socials { display: flex; gap: 16px; }
.footer-socials a { color: var(--text-muted); transition: color var(--transition); }
.footer-socials a:hover { color: var(--primary); }

/* ==========================================================================
   SCROLL REVEALS
   ========================================================================== */
.reveal-up { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-scale { opacity: 0; transform: scale(0.95); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-left { opacity: 0; transform: translateX(30px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-right { opacity: 0; transform: translateX(-30px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.is-visible { opacity: 1; transform: translate(0) scale(1); }

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid, .product-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-content, .product-info { text-align: center; }
    .hero-subtext, .section-desc { margin-left: auto; margin-right: auto; }
    .hero-cta-area, .primary-buttons, .store-buttons { justify-content: center; }
    .feature-bullets { align-items: center; }
    .product-grid.reverse .product-visual { order: -1; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links, .auth-buttons { display: none; }
    .mobile-toggle { display: block; }
    .nav-links.mobile-active {
        display: flex; flex-direction: column; position: absolute;
        top: var(--nav-height); left: 0; right: 0; background: var(--surface);
        padding: 24px; border-bottom: 1px solid var(--border); gap: 20px;
        box-shadow: var(--shadow-md);
    }
    .metrics-grid { flex-direction: column; }
    .metric-divider { display: none; }
    .steps-container { grid-template-columns: 1fr; }
    .float-chip { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .compliance-badge { margin: 16px auto 0; }
    .footer-brand { text-align: center; display: flex; flex-direction: column; align-items: center;}
}

@media (max-width: 480px) {
    .vcard-ui { width: 100%; height: auto; aspect-ratio: 1.58; }
    .vcard-number { font-size: 1rem; }
    .primary-buttons, .store-buttons, .final-cta-buttons { flex-direction: column; width: 100%; }
    .btn-lg, .store-btn { width: 100%; justify-content: center; }
}