/* ========================================
   GARDEN TOWER RINCON — 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(78, 196, 154, 0.3);
    color: #F0FBF7;
}

/* Navbar */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #4EC49A;
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Hamburger Animation */
#menuBtn.active #menuIcon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active #menuIcon span:nth-child(2) {
    opacity: 0;
    width: 0;
}

#menuBtn.active #menuIcon span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 6px;
}

/* Scroll Reveal */
.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-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }

    .animate-scroll {
        animation: none;
    }
}

/* Scroll Reveal — hidden by default, shown via JS */
.reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* Gallery Scroll Animation */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll {
    display: flex;
    gap: 0;
    animation: scroll-left 40s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .animate-scroll {
        animation: none;
    }
}

/* Form Focus Styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Smooth Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

::-webkit-scrollbar-track {
    background: #050D1A;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #234B8C;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #4EC49A;
    outline-offset: 2px;
}

/* Button Hover Glow */
button:hover,
a:hover {
    /* handled via Tailwind utilities */
}

/* Aspect Ratio Fallbacks */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

/* Print Styles */
@media print {
    #navbar,
    .animate-scroll,
    #menuBtn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .bg-midnight-900,
    .bg-midnight-800 {
        background: white !important;
        color: black !important;
    }
}
