/* Design System & Global Styles */
:root {
    /* Color Palette - Premium Trust */
    --color-primary: #0f172a;
    /* Deep Slate Blue */
    --color-primary-light: #1e293b;
    --color-accent: #059669;
    /* Emerald Green - Money/Success */
    --color-accent-hover: #047857;
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-danger: #ef4444;
    --color-white: #ffffff;
    --color-glass: rgba(30, 41, 59, 0.7);
    --color-glass-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-serif: 'Playfair Display', serif;
    /* For Headings */

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 15px rgba(5, 150, 105, 0.3);

    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--color-primary);
    background-image:
        radial-gradient(at 0% 0%, rgba(5, 150, 105, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 1) 0px, transparent 50%);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    margin: 0 0 var(--spacing-md);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
}

.gap-4 {
    gap: var(--spacing-md);
}

/* Components handled in component specific css if needed, but keeping global for now due to small scale */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(5, 150, 105, 0.5);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-glass-border);
    color: var(--color-text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-text-muted);
}

.glass-panel {
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.card {
    padding: var(--spacing-lg);
    transition: transform var(--transition-smooth);
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Form Elements */
.input-group {
    margin-bottom: var(--spacing-md);
}

.input-label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xs);
}

.input-field {
    width: 100%;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-md);
    color: var(--color-text-main);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

/* Mobile Navigation */
.mobile-header {
    display: none;
    margin: var(--spacing-md);
    padding: var(--spacing-sm);
    justify-content: center;
    align-items: center;
}

.mobile-header a {
    text-decoration: none;
    color: var(--color-white);
}


.mobile-nav {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    justify-content: space-around;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-glass-border);
    z-index: 9000;
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    gap: 4px;
    width: 100%;
    padding: 4px;
    border-radius: 8px;
}

.mobile-nav a:active {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav a.active {
    color: var(--color-accent);
}

.mobile-nav a span:first-child {
    font-size: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-smooth) forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-nav {
        display: flex !important;
    }

    .mobile-header {
        display: flex !important;
    }

    /* Padding for Fixed Bottom Nav */
    #main-content {
        padding-bottom: 90px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Adjust cards and panels for smaller screens */
    .glass-panel {
        border-radius: var(--radius-md);
        padding: var(--spacing-md);
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .flex.gap-4 {
        gap: var(--spacing-sm);
    }
}

/* DEEP REALISM: Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-primary);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Hero Layout */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding: 4rem 1rem;
}

@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 6rem;
        padding-bottom: 2rem;
        gap: 3rem;
        min-height: auto;
    }

    .button-group {
        justify-content: center;
    }

    /* Scale down 3D card on mobile */
    .hero-container .glass-panel {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 450/500;
        transform: scale(0.9);
    }
}