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

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

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal[data-reveal-state="hidden"] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Navbar Transition */
#navbar.scrolled {
    background: rgba(10, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Menu Tabs */
.menu-tab {
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-tab.active {
    color: #102a43;
    background: #fbbf24;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.menu-tab:not(.active):hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

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

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

.mobile-link {
    display: block;
}

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

::-webkit-scrollbar-track {
    background: #102a43;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #fbbf24;
}

/* Selection */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #102a43;
}

/* Image Hover Zoom Wrapper */
.rounded-2xl.overflow-hidden {
    position: relative;
}

.rounded-2xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Button Focus States */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Gallery Image Cursor */
.rounded-2xl.overflow-hidden.cursor-pointer {
    cursor: pointer;
}

.rounded-2xl.overflow-hidden.cursor-pointer img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth transitions for all interactive elements */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .rounded-2xl.overflow-hidden img {
        transition: none;
    }
    
    .rounded-2xl.overflow-hidden.cursor-pointer img {
        transition: none;
    }
}
