@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
    /* Semantic Colors - High Trust Fintech Palette */
    --primary-hue: 142;
    /* Green */
    --bg-hue: 222;
    /* Navy */

    --color-primary: hsl(var(--primary-hue), 76%, 36%);
    --color-primary-glow: hsla(var(--primary-hue), 76%, 36%, 0.5);

    --bg-dark: hsl(var(--bg-hue), 47%, 11%);
    --bg-dark-surface: hsl(var(--bg-hue), 47%, 13%);
    --bg-dark-surface-2: hsl(var(--bg-hue), 47%, 18%);

    --text-main: #ffffff;
    --text-muted: #94a3b8;

    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.6);
}

html.light {
    --bg-dark: #FDFBF7;
    /* Warm white */
    --bg-dark-surface: #ffffff;
    --bg-dark-surface-2: #F2F0E9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.8);
}

/* Hard Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    /* Body text for readability */
    background-color: var(--bg-dark);
    color: var(--text-main);
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    /* Headings for personality */
}

/* --- Utilities --- */

/* Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html.light .text-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.text-gradient-green {
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glowing Effects */
.glow-point {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

/* --- Animations --- */

/* Reveal on Scroll Class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Children */
.reveal-group .reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal-group .reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal-group .reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal-group .reveal:nth-child(4) {
    transition-delay: 0.4s;
}

/* Pulse Glow */
@keyframes pulse-soft {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.2);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.btn-primary:hover:after {
    transform: translateY(0);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--color-primary);
}

/* Bento Grid Layouts */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-flow: dense;
    }

    .bento-card-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .bento-card-tall {
        grid-row: span 2;
    }
}

/* View Section Handling */
.view-section {
    display: none;
    opacity: 0;
    /* No transition here for display, controlled in JS or keyframes for content */
}

.view-section.active {
    display: block;
    animation: fadeInPage 0.5s ease-out forwards;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hide scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}