/* ============================================
   El Jaliciense #3 — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(74, 168, 122, 0.3);
    color: #e6f5ef;
}

/* ============================================
   Animations
   ============================================ */

/* Slow zoom for hero background */
@keyframes slow-zoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.08);
    }
}

.animate-slow-zoom {
    animation: slow-zoom 20s ease-in-out infinite alternate;
}

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

.animate-scroll-down {
    animation: scroll-down 2s ease-in-out infinite;
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Stagger children */
.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }
.fade-in-up:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   Navbar
   ============================================ */

#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(5, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================
   Mobile Menu
   ============================================ */

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeInUp 0.5s ease-out forwards;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }

/* Menu button active state */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

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

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

/* ============================================
   Menu Items
   ============================================ */

.menu-category {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.menu-category.visible {
    opacity: 1;
    transform: translateY(0);
}

.menu-category .group {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: padding-left 0.3s ease;
}

.menu-category .group:last-child {
    border-bottom: none;
}

.menu-category .group:hover {
    padding-left: 8px;
}

.menu-category .group:hover span:first-child {
    color: #a3d9bc;
}

/* ============================================
   Gallery
   ============================================ */

#gallery .group {
    position: relative;
    overflow: hidden;
}

#gallery .group::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 13, 26, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

#gallery .group:hover::after {
    opacity: 1;
}

/* ============================================
   Scroll Reveal
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 769px) {
    html {
        font-size: 16px;
    }
}

/* ============================================
   Focus Styles
   ============================================ */

a:focus-visible,
button:focus-visible {
    outline: 2px solid #4aa87a;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
