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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

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

/* Scroll Reveal - Progressive Enhancement via JS */
@media (prefers-reduced-motion: no-preference) {
    .scroll-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);
    }

    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger children */
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(15, 20, 51, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f1433;
}

::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4ade80;
}

/* Selection */
::selection {
    background: #4ade80;
    color: #0f1433;
}

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image hover zoom container */
.rounded-2xl.overflow-hidden img {
    display: block;
}

/* Prevent layout shift on select */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%230f1433' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    image-rendering: auto;
    loading: lazy;
}
