/* ============================================
   Dhi Money — Shared Design System
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* Primary */
    --primary: #2563EB;
    --primary-light: #60A5FA;
    --primary-dark: #1D4ED8;
    --primary-glow: rgba(37, 99, 235, 0.4);
    --primary-soft: rgba(37, 99, 235, 0.1);
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);

    /* Secondary */
    --secondary: #7C3AED;
    --secondary-light: #A78BFA;
    --secondary-soft: rgba(124, 58, 237, 0.1);
    --gradient-secondary: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);

    /* Tertiary */
    --tertiary: #0D9488;
    --tertiary-light: #2DD4BF;
    --tertiary-soft: rgba(13, 148, 136, 0.1);

    /* Semantic */
    --success: #10B981;
    --success-soft: rgba(16, 185, 129, 0.1);
    --warning: #F59E0B;
    --warning-soft: rgba(245, 158, 11, 0.1);
    --error: #EF4444;
    --error-soft: rgba(239, 68, 68, 0.1);

    /* Backgrounds - Dark Mode (default) */
    --bg-primary: #0A0A0A;
    --bg-secondary: #111114;
    --bg-card: #18181c;
    --bg-card-hover: #1e1e23;

    /* Text - Dark Mode (default) */
    --text-primary: #F5F5F5;
    --text-secondary: #A1A1A6;
    --text-muted: #6B6B70;

    /* Borders - Dark Mode (default) */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-sm2: 12px;
    --space-md: 16px;
    --space-md2: 20px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xl2: 40px;
    --space-xxl: 48px;

    /* Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-round: 100px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 4px 20px var(--primary-glow);
}

/* ---------- Light Mode ---------- */
[data-theme="light"] {
    /* Backgrounds - Light Mode */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F3F4F6;

    /* Text - Light Mode */
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;

    /* Borders - Light Mode */
    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.2);

    /* Shadows - Light Mode */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);

    /* Adjust glows for light mode */
    --primary-glow: rgba(37, 99, 235, 0.15);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
}

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

/* ---------- Background Glow ---------- */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-glow::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -400px;
    left: 50%;
    transform: translateX(-50%);
    animation: glow-pulse 8s ease-in-out infinite;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.bg-glow::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation: glow-pulse 10s ease-in-out infinite reverse;
    opacity: 1;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .bg-glow::before,
[data-theme="light"] .bg-glow::after {
    opacity: 0.3;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.5; transform: translateX(-50%) scale(1.1); }
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) 0;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.85);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm2);
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Nav */
nav {
    display: flex;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-download {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-primary);
}

.nav-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--primary-glow);
    color: white !important;
}

/* Theme toggle button */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: rotate(20deg);
}

.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: var(--space-sm);
}

/* ---------- Footer ---------- */
.site-footer {
    padding: var(--space-xxl) 0 var(--space-lg);
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xxl);
    margin-bottom: var(--space-xxl);
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
}

.footer-brand .footer-tagline {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: var(--space-lg);
    max-width: 280px;
}

.footer-store-badges {
    display: flex;
    gap: var(--space-sm2);
}

.footer-store-badges a img {
    height: 36px;
    width: auto;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: var(--space-sm2);
}

.footer-col a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    color: var(--text-muted);
    font-size: 13px;
}

/* ---------- App Store Badges ---------- */
.store-badges {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

.store-badges.center {
    justify-content: center;
}

.store-badge {
    display: inline-flex;
    transition: transform 0.2s ease;
}

.store-badge:hover {
    transform: translateY(-2px);
}

.store-badge img {
    height: 48px;
    width: auto;
}

.store-badges.small .store-badge img {
    height: 36px;
}

.store-badges.large .store-badge img {
    height: 56px;
}

/* ---------- Download CTA Banner ---------- */
.download-cta {
    padding: var(--space-xxl) 0;
    text-align: center;
}

.download-cta-box {
    padding: 64px var(--space-xxl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.download-cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.download-cta-box h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    margin-bottom: var(--space-md);
    letter-spacing: -0.5px;
}

.download-cta-box p {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 500px;
    margin: 0 auto var(--space-xl);
}

.trust-signals {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.trust-signal {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 14px;
}

.trust-signal svg {
    width: 16px;
    height: 16px;
    color: var(--success);
}

/* ---------- Inline App CTA ---------- */
.inline-app-cta {
    padding: var(--space-lg);
    background: var(--primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.inline-app-cta p {
    color: var(--text-secondary);
    font-size: 15px;
}

.inline-app-cta p strong {
    color: var(--text-primary);
}

.inline-app-cta .store-badges {
    flex-shrink: 0;
}

/* ---------- Sticky Mobile Download Bar ---------- */
.mobile-download-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    padding: var(--space-sm2) var(--space-md);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .mobile-download-bar {
    background: rgba(255, 255, 255, 0.95);
}

.mobile-download-bar .bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-download-bar .bar-text {
    font-size: 14px;
    font-weight: 600;
}

.mobile-download-bar .bar-text span {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

.mobile-download-bar .bar-btn {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* ---------- Section Helpers ---------- */
.section-label {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-round);
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: var(--space-xxl);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-secondary-gradient {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Cards ---------- */
.card {
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: var(--space-md);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--primary-glow);
    color: white;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--primary-light);
    padding: 8px 16px;
}

.btn-ghost:hover {
    background: var(--primary-soft);
    color: var(--primary-light);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb .sep {
    color: var(--text-muted);
    opacity: 0.5;
}

/* ---------- Responsive ---------- */

/* Tablet */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .inline-app-cta {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .container {
        padding: 0 var(--space-md);
    }

    .site-header {
        padding: var(--space-sm2) 0;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-text {
        font-size: 24px;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
    }

    [data-theme="light"] nav {
        background: rgba(255, 255, 255, 0.98);
    }

    nav.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
    }

    .menu-toggle {
        display: block;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: var(--space-xl);
    }

    .section-label {
        font-size: 11px;
        padding: 5px 10px;
    }

    .mobile-download-bar {
        display: block;
    }

    /* Add padding at bottom for sticky bar */
    body {
        padding-bottom: 64px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }

    .download-cta-box {
        padding: var(--space-xl) var(--space-md);
    }

    .download-cta-box h2 {
        font-size: 24px;
    }

    .download-cta-box p {
        font-size: 15px;
    }

    .trust-signals {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm2);
    }

    .store-badges {
        justify-content: center;
    }

    /* Reduce glow on mobile */
    .bg-glow::before,
    .bg-glow::after {
        opacity: 0.2;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .section-title {
        font-size: 24px;
    }
}
