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

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f1a;
}
::-webkit-scrollbar-thumb {
    background: #2c3654;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4a5a8a;
}

/* Selection */
::selection {
    background: rgba(74, 158, 136, 0.3);
    color: #f0f3f8;
}

/* Reveal animations — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible if JS is disabled or prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(10, 15, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .text-white/80 {
    color: rgba(255, 255, 255, 0.85) !important;
}

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

/* Button focus */
a:focus-visible, button:focus-visible {
    outline: 2px solid #6fb8a6;
    outline-offset: 3px;
    border-radius: 2px;
}

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

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

/* Subtle grain overlay for hero */
#hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

#hero > * {
    position: relative;
    z-index: 2;
}

/* Card hover glow */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Gold accent line on section titles */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #4a9e88, transparent);
    margin-top: 16px;
}
