/* Custom styles for The Mt Index Sand-Bar */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #1A0D1A;
}

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

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

/* Selection color */
::selection {
    background: #D4A24E;
    color: #1A0D1A;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(26, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hero card hover effects */
#hero .absolute > div {
    will-change: transform;
}

/* Gallery image hover */
#gallery img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Form input focus glow */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px #D4A24E;
}

/* Subtle pulse for decorative elements */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #gallery img {
        transition: none;
    }

    #gallery img:hover {
        transform: none;
    }
}

/* Mobile menu active state */
.mobile-menu-active #mobile-menu {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-active .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Mobile menu button animation */
.mobile-menu-active #menu-btn .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-active #menu-btn .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-active #menu-btn .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

#hero .absolute > div:nth-child(1) {
    animation: float 6s ease-in-out infinite;
}

#hero .absolute > div:nth-child(2) {
    animation: float 6s ease-in-out infinite 2s;
}

#hero .absolute > div:nth-child(3) {
    animation: float 6s ease-in-out infinite 4s;
}

/* Scroll reveal base state (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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