/* Base styles & resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Navbar scroll state */
nav {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

nav.scrolled {
    background-color: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
}

/* Nav link hover underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2dd4bf;
    border-radius: 1px;
    transition: width 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Menu tabs */
.menu-tab {
    color: #64748b;
    background: transparent;
}

.menu-tab.active {
    color: #0d9488;
    background: #f0fdfa;
    box-shadow: 0 1px 4px rgba(13, 148, 136, 0.12);
}

.menu-tab:not(.active):hover {
    color: #334155;
    background: rgba(241, 245, 249, 0.5);
}

/* Menu panel transitions */
.menu-panel {
    animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal — progressive enhancement via JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.mobile-menu-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 12px;
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

/* Subtle image hover zoom */
.rounded-3xl.overflow-hidden img {
    transition: transform 0.6s ease;
}

.rounded-3xl.overflow-hidden:hover img {
    transform: scale(1.04);
}

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

::-webkit-scrollbar-track {
    background: #f8fafc;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        transition: none;
    }
    
    .rounded-3xl.overflow-hidden img {
        transition: none;
    }
    
    .menu-panel {
        animation: none;
    }
    
    button, a {
        transition: none;
    }
}
