/* ===== Custom Styles for The Roost ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d0d12;
}
::-webkit-scrollbar-thumb {
    background: #3f3f4a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #E85D4A;
}

/* Selection color */
::selection {
    background: rgba(232, 93, 74, 0.3);
    color: #f7f7f8;
}

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

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

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Scroll indicator */
@keyframes scroll-indicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.animate-scroll-indicator {
    animation: scroll-indicator 1.5s ease-in-out infinite;
}

/* Marquee */
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.marquee-track {
    animation: marquee 30s linear infinite;
}

.marquee-content {
    animation: marquee 30s linear infinite;
}

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

#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(13, 13, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(63, 63, 74, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

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

/* Hamburger animation */
.hamburger-line {
    transition: all 0.3s ease;
}

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

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

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

/* ===== Menu Cards ===== */

.menu-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card:hover {
    box-shadow: 0 20px 60px rgba(232, 93, 74, 0.1);
}

.menu-card:hover .w-16 {
    transform: scale(1.1) rotate(5deg);
}

/* ===== Experience Cards ===== */

.experience-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 13, 18, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    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; }

/* ===== Geometric shape animations ===== */

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-20px) rotate(12deg); }
}

/* ===== Button hover effects ===== */

a, button {
    -webkit-tap-highlight-color: transparent;
}

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

@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    .marquee-content {
        font-size: 0.875rem;
    }
}

/* ===== Focus visible ===== */

:focus-visible {
    outline: 2px solid #E85D4A;
    outline-offset: 2px;
}

/* ===== 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;
    }
}
