/* ============================================
   Trolio Hotel — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

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

#navbar.scrolled {
    background-color: rgba(5, 10, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(167, 243, 208, 0.1);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #A7F3D0;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-content {
    animation: heroFadeIn 1s ease-out forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays */
    .room-card:nth-child(1) { transition-delay: 0.1s; }
    .room-card:nth-child(2) { transition-delay: 0.2s; }
    .room-card:nth-child(3) { transition-delay: 0.3s; }
    
    .amenity-card:nth-child(1) { transition-delay: 0.05s; }
    .amenity-card:nth-child(2) { transition-delay: 0.1s; }
    .amenity-card:nth-child(3) { transition-delay: 0.15s; }
    .amenity-card:nth-child(4) { transition-delay: 0.2s; }
    .amenity-card:nth-child(5) { transition-delay: 0.25s; }
    .amenity-card:nth-child(6) { transition-delay: 0.3s; }
    .amenity-card:nth-child(7) { transition-delay: 0.35s; }
    .amenity-card:nth-child(8) { transition-delay: 0.4s; }
}

/* When JS is disabled or reduced motion preferred, content is always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Room Cards
   ============================================ */
.room-card {
    background: white;
    border-radius: 1rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(10, 22, 40, 0.1);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu {
    padding-top: 2rem;
}

.mobile-nav-link {
    font-size: 1.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* ============================================
   Button & Link Focus States
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #A7F3D0;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: rgba(167, 243, 208, 0.3);
    color: #0A1628;
}

/* ============================================
   Responsive tweaks
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}
