/* ============================================
   WEALTHWISE AI — Base / Reset / Animations
   ============================================ */

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

ul,
ol {
    list-style: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: hsla(228, 22%, 30%, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsla(228, 22%, 40%, 0.7);
}

/* ---- Ambient Background ---- */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    animation: floatBlob 20s ease-in-out infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: hsl(250, 85%, 40%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: hsl(190, 90%, 35%);
    bottom: -10%;
    right: -5%;
    animation-delay: -7s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: hsl(320, 75%, 35%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

/* ---- Keyframe Animations ---- */
@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -40px) scale(1.08);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.95);
    }

    100% {
        transform: translate(15px, -15px) scale(1.03);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility animation classes */
.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.slide-in-l {
    animation: slideInLeft 0.4s ease forwards;
}

.slide-in-r {
    animation: slideInRight 0.4s ease forwards;
}

.scale-in {
    animation: scaleIn 0.3s ease forwards;
}

/* Staggered children */
.stagger>* {
    opacity: 0;
    animation: fadeInUp 0.45s ease forwards;
}

.stagger>*:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger>*:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger>*:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger>*:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger>*:nth-child(6) {
    animation-delay: 0.3s;
}

.stagger>*:nth-child(7) {
    animation-delay: 0.35s;
}

.stagger>*:nth-child(8) {
    animation-delay: 0.4s;
}

.stagger>*:nth-child(9) {
    animation-delay: 0.45s;
}

.stagger>*:nth-child(10) {
    animation-delay: 0.5s;
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-income {
    color: var(--color-income);
}

.text-expense {
    color: var(--color-expense);
}

.text-warning {
    color: var(--color-warning);
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

.fw-semi {
    font-weight: var(--fw-semi);
}

.fw-bold {
    font-weight: var(--fw-bold);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.flex-1 {
    flex: 1;
}

.grid {
    display: grid;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}