/* CSS Variables for light/dark */
:root {
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-alt: #f8fafc;
    --bg-cta: #f1f5f9;
    --bg-drawer: #ffffff;
    --text-primary: #0c1f2b;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 20px 40px -12px rgba(0, 20, 30, 0.15);
    --shadow-hover: 0 28px 48px -16px rgba(0, 20, 30, 0.2);
    --shadow-drawer: 0 0 40px rgba(0, 0, 0, 0.2);
    --badge-bg: #dbeafe;
    --badge-text: #1d4ed8;
    --highlight: #2563eb;
    --radius-card: 2rem;
    --radius-inner: 1.25rem;
    --radius-btn: 40px;
    --img-border: #e2e8f0;
}

[data-theme="dark"] {
    --bg-page: #0f172a;
    --bg-card: #1e293b;
    --bg-card-alt: #0f172a;
    --bg-cta: #0f172a;
    --bg-drawer: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 28px 48px -16px rgba(0, 0, 0, 0.7);
    --shadow-drawer: 0 0 40px rgba(0, 0, 0, 0.5);
    --badge-bg: #1e293b;
    --badge-text: #60a5fa;
    --highlight: #60a5fa;
    --img-border: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-page);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-btn);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.theme-toggle:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-hover);
}

.theme-toggle .icon {
    font-size: 1rem;
}

/* ===== DRAWER TOGGLE ===== */
.drawer-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-btn);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    line-height: 1;
}

.drawer-toggle:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-hover);
}

/* ===== DRAWER ===== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: var(--bg-drawer);
    box-shadow: var(--shadow-drawer);
    z-index: 200;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.drawer.open {
    left: 0;
}

.drawer-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
}

.drawer-close:hover {
    color: var(--text-primary);
}

.drawer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.drawer-logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.drawer-logo span {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.drawer-nav a {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drawer-nav a:hover {
    background: var(--bg-card-alt);
    color: var(--text-primary);
}

.drawer-nav a.active {
    background: var(--highlight);
    color: #fff;
}

.drawer-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== CARD ===== */
.card {
    max-width: 920px;
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 2.5rem 2.8rem;
    transition: background 0.3s ease, box-shadow 0.2s ease, color 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* ===== LANDING PAGE ===== */
.landing-content {
    text-align: center;
    padding: 2rem 0;
}

.landing-logo {
    max-width: 240px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.landing-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.landing-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.landing-btn {
    display: inline-block;
    background: var(--highlight);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    padding: 0 2.5rem;
    height: 3.2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    line-height: 3.2rem;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.landing-btn:hover {
    transform: scale(1.04);
    opacity: 0.92;
}

/* ===== SCREENSHOT SECTION ===== */
.screenshot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.8rem 0 1.8rem;
}

.screenshot-wrapper {
    border-radius: var(--radius-inner);
    overflow: hidden;
    border: 1px solid var(--img-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-card-alt);
}

.screenshot-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: var(--bg-card-alt);
    transition: background 0.3s ease;
    max-height: 400px;
}

.screenshot-caption {
    padding: 0.5rem 1rem 0.7rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--img-border);
    transition: border-color 0.3s ease, color 0.3s ease;
    background: var(--bg-card-alt);
}

.screenshot-caption span {
    font-weight: 500;
    color: var(--highlight);
}

/* ===== GRID ===== */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.6rem 0;
}

.card-inner {
    background: var(--bg-card-alt);
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    border-radius: var(--radius-inner);
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.card-inner h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-inner p,
.card-inner li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-inner ul {
    padding-left: 1.2rem;
    list-style-type: disc;
}

.card-inner ul li {
    margin-bottom: 0.2rem;
}

/* ===== CTA ===== */
.cta-section {
    background: var(--bg-cta);
    border-radius: var(--radius-inner);
    padding: 1.8rem 1.8rem 1.6rem;
    text-align: center;
    margin: 1.6rem 0 0.5rem;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.cta-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.cta-section .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--highlight);
    margin: 0.3rem 0 0.6rem;
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    max-width: 500px;
    margin: 0 auto 1rem;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.3rem 0 0.3rem;
}

.btn {
    border: none;
    border-radius: var(--radius-btn);
    min-width: 10rem;
    padding: 0 1.5rem;
    height: 3rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.97);
}

.paypal-btn {
    background-color: #FFD140;
    color: #000;
}

.mpesa-btn {
    background-color: #F97316;
    color: #ffffff;
}

.whatsapp-btn {
    background-color: #25D366;
    color: #ffffff;
}

.free-btn {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.support-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
}

.divider {
    margin: 2rem 0 1.6rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0.4;
}

/* ===== FOOTER ===== */
.footer-note {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: border-color 0.3s ease;
}

.footer-note a {
    color: var(--highlight);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted rgba(37, 99, 235, 0.25);
}

.footer-note a:hover {
    border-bottom-color: var(--highlight);
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 0.4rem;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    animation: pulse-dot 2.4s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* ===== MOBILE ===== */
@media (max-width: 640px) {
    body { padding: 0.75rem; }
    .card { padding: 1.5rem 1.2rem; border-radius: 1.5rem; }
    h1 { font-size: 1.8rem; }
    .landing-content h1 { font-size: 2rem; }
    .landing-logo { max-width: 160px; }
    .landing-content p { font-size: 1rem; }

    .screenshot-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.2rem 0;
    }
    .screenshot-wrapper img { max-height: 320px; }

    .grid-2col {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }
    .card-inner { padding: 1.2rem; }

    .cta-section { padding: 1.4rem 1rem 1.2rem; margin: 1.2rem 0 0.3rem; border-radius: 1rem; }
    .cta-section .price { font-size: 1.3rem; }

    .btn-group { flex-direction: column; align-items: center; gap: 0.5rem; }
    .btn { width: 100%; max-width: 280px; height: 2.8rem; font-size: 0.82rem; min-width: 0; padding: 0 1.2rem; }

    .drawer { width: 280px; left: -300px; padding: 1.5rem 1.2rem; }
    .drawer.open { left: 0; }

    .theme-toggle { top: 10px; right: 10px; padding: 6px 12px; font-size: 0.75rem; }
    .drawer-toggle { top: 10px; left: 10px; padding: 6px 12px; font-size: 1rem; }

    .footer-note { font-size: 0.72rem; flex-direction: column; text-align: center; }
}

@media (max-width: 380px) {
    .card { padding: 1rem 0.9rem; }
    .landing-content h1 { font-size: 1.6rem; }
    .screenshot-wrapper img { max-height: 240px; }
}