/* Custom styles for The Shire of Homer BnB */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #070d1f;
}
::-webkit-scrollbar-thumb {
    background: #1a3456;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* Selection */
::selection {
    background: rgba(52, 211, 153, 0.3);
    color: #fff;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(7, 13, 31, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}
.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Reveal animations */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 0.8s ease forwards;
}

.reveal-text:nth-child(1) { animation-delay: 0.1s; }
.reveal-text:nth-child(2) { animation-delay: 0.25s; }
.reveal-text:nth-child(3) { animation-delay: 0.4s; }
.reveal-text:nth-child(4) { animation-delay: 0.55s; }

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intersection Observer reveals */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-line {
    transition: all 0.3s ease;
}
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Nav links hover effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #34d399;
    transition: width 0.3s ease;
}
.nav-link {
    position: relative;
}
.nav-link:hover::after {
    width: 100%;
}

/* Parallax-like subtle movement */
@media (prefers-reduced-motion: no-preference) {
    .group:hover .aspect-\[4\/3\] img,
    .group:hover .aspect-\[3\/4\] img,
    .group:hover .aspect-square img {
        transform: scale(1.05);
    }
}

/* Form focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2);
}

/* Back to top button */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Gallery hover overlay */
.aspect-square.group {
    position: relative;
}
.aspect-square.group::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 13, 31, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}
.aspect-square.group:hover::after {
    opacity: 1;
}

/* Subtle shimmer on gradient text */
.bg-clip-text {
    background-clip: text;
    -webkit-background-clip: text;
}

/* Room card hover glow */
.group:hover {
    box-shadow: 0 20px 60px -15px rgba(52, 211, 153, 0.1);
}

/* Decorative line animation */
.h-px.bg-gradient-to-b,
.h-px.bg-gradient-to-l,
.h-px.bg-gradient-to-r {
    transition: opacity 0.3s ease;
}

/* Loading state for form button */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
