/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Scroll reveal base — content visible by default, JS adds animation */
.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glass stat cards */
.glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 24px;
    width: 180px;
    animation: float 6s ease-in-out infinite;
}

.glass-card:nth-child(2) {
    animation-delay: -1.5s;
}

.glass-card:nth-child(3) {
    animation-delay: -3s;
}

.glass-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Nav scroll state */
.nav-scrolled {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* Subtle hover line animation on menu items */
#menu li {
    position: relative;
}

#menu li .hover-line {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #14b8a6;
    transition: width 0.3s ease;
}

#menu li:hover .hover-line {
    width: 100%;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Selection color */
::selection {
    background: #ccfbf1;
    color: #134e4a;
}
