/* ============================================
   TejTara Foundation – Design System Tokens
   Cutting-edge NGO aesthetic
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* ── Core Palette ── */
    --primary-deep: #0a1628;
    --primary-color: #0d2137;
    --primary-light: #132d4a;
    --primary-dark: #060f1c;
    --secondary-color: #fbbf24;
    --accent-color: #00e5ff;
    --accent-warm: #f59e0b;
    --accent-green: #10b981;
    --accent-rose: #f43f5e;

    /* ── Text (defaults for light/white backgrounds) ── */
    --text-dark: #1e293b;
    --text-primary: #334155;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --text-secondary: #64748b;
    --text-on-dark: #e2e8f0;
    --text-on-light: #1e293b;

    /* ── Surfaces ── */
    --white: #ffffff;
    --light-bg: #f8fafc;
    --dark-bg: #0a1628;
    --surface-glass: rgba(255, 255, 255, 0.06);
    --surface-glass-strong: rgba(255, 255, 255, 0.1);
    --surface-card: rgba(255, 255, 255, 0.04);
    --surface-light-card: #ffffff;

    /* ── Gradients ── */
    --gradient-primary: linear-gradient(135deg, #0a1628 0%, #132d4a 50%, #0d2137 100%);
    --gradient-secondary: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-blue: linear-gradient(135deg, #00e5ff 0%, #0ea5e9 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    --gradient-neon: linear-gradient(135deg, #00e5ff 0%, #10b981 100%);
    --gradient-hero: linear-gradient(160deg, #0a1628 0%, #0d2845 40%, #0f3460 70%, #0a1628 100%);
    --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(251, 191, 36, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    --gradient-light-section: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f0f9ff 100%);
    --gradient-footer: linear-gradient(160deg, #060f1c 0%, #0a1628 50%, #0d1b2e 100%);

    /* ── Shadows (for light backgrounds) ── */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12);
    --glow-teal: 0 0 30px rgba(0, 229, 255, 0.3), 0 0 60px rgba(0, 229, 255, 0.1);
    --glow-gold: 0 0 30px rgba(251, 191, 36, 0.3), 0 0 60px rgba(251, 191, 36, 0.1);
    --glow-purple: 0 0 30px rgba(139, 92, 246, 0.3);
    --glow-card: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);

    /* ── Glass ── */
    --glass-blur: blur(20px);
    --glass-blur-lg: blur(40px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-border-hover: 1px solid rgba(0, 229, 255, 0.3);

    /* ── Radii ── */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --border-radius-full: 9999px;

    /* ── Transitions ── */
    --transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-slow: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    /* ── Spacing ── */
    --section-padding: 6rem 0;
    --container-max: 1200px;
}

/* ── Dark Section Variant (hero, footer, CTA) ── */
.dark-section,
.hero-section,
.footer,
.cta-section {
    --text-dark: #f1f5f9;
    --text-primary: #e2e8f0;
    --text-light: #94a3b8;
    --text-secondary: #94a3b8;
    --text-lighter: #64748b;
    --surface-card: rgba(255, 255, 255, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.35);
    --glow-card: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

html,
body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-on-light);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.container,
.container-fluid {
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* ── Selection ── */
::selection {
    background: rgba(0, 229, 255, 0.3);
    color: #ffffff;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0d2137, #132d4a);
    border-radius: 4px;
}

/* ── Focus States ── */
.navbar-nav .nav-link:focus,
.modern-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

/* ── Lazy Loading ── */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

img[loading="lazy"] {
    width: 100%;
    aspect-ratio: attr(width) / attr(height);
}

/* ── Touch Targets ── */
a,
button,
input,
textarea {
    touch-action: manipulation;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
    }

    body {
        overflow-x: hidden;
        padding-top: 60px;
    }

    .modern-nav {
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1000;
        height: auto;
        padding: 0.5rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.85rem;
        margin: 0.1rem 0;
    }

    .container,
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .hero-section {
        padding-top: 60px;
        min-height: 90vh;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 50px;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .donate-btn {
        padding: 0.4rem 0.8rem !important;
        margin-left: 0.2rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .modern-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .mission-card {
        padding: 1rem 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}