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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Fade-up animation for hero (above the fold — always visible) */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation-name: fadeUp;
    animation-duration: 0.9s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-iteration-count: 1;
}

@keyframes bounceSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

.animate-bounce-slow {
    animation: bounceSlow 2.5s ease-in-out infinite;
}

/* Scroll reveal — progressive enhancement, hidden by default */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-32px);
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(32px);
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal-up.is-visible,
    .reveal-left.is-visible,
    .reveal-right.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* Navbar glass effect */
#nav.scrolled {
    background: rgba(4, 13, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile menu transitions */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Thin scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #040d1a;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Selection */
::selection {
    background: rgba(14, 150, 120, 0.3);
    color: #f0fdf9;
}
