/* Base & Animations */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Scroll indicator animation */
@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(200%);
        opacity: 0;
    }
}

.animate-scrollDown {
    animation: scrollDown 1.8s ease-in-out infinite;
}

/* Fade-in animation for sections */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(15, 23, 32, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Menu tab transitions */
.menu-tab {
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
}

.menu-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.menu-tab.active {
    color: #0f1720;
    background: #3da371;
    box-shadow: 0 2px 10px rgba(61, 163, 113, 0.3);
}

.menu-panel {
    animation: menuFadeIn 0.4s ease-out;
}

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

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgb(15, 23, 32) inset !important;
    -webkit-text-fill-color: #ffffff !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3da371;
}

/* Selection color */
::selection {
    background: rgba(61, 163, 113, 0.3);
    color: #f0f3f9;
}

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

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

/* Gallery image hover overlay */
.rounded-2xl.overflow-hidden {
    position: relative;
}

.rounded-2xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 32, 0.2) 0%, transparent 40%);
    pointer-events: none;
    border-radius: inherit;
}

/* Subtle grain texture overlay for hero */
#hero::before {
    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 > .relative {
    position: relative;
    z-index: 2;
}
