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

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: #E8C4EC;
    color: #4F1C4C;
}

/* ── Scroll Reveal ── */
/* Default: content is always visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When JS is active and user prefers motion, enable the animation */
@media (prefers-reduced-motion: no-preference) {
    .js-active .reveal {
        opacity: 0;
        transform: translateY(32px);
    }

    .js-active .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .js-active .room-card {
        opacity: 0;
        transform: translateY(24px);
    }

    .js-active .room-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered delays for grid items */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(249, 240, 251, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(123, 45, 118, 0.08);
    padding: 0;
}

.nav-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

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

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

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

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

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

/* ── Room Cards ── */
.room-card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(79, 28, 76, 0.15);
}

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

::-webkit-scrollbar-track {
    background: #F9F0FB;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #D79DD9;
}

/* ── Focus Visible ── */
*:focus-visible {
    outline: 2px solid #F5C518;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Print ── */
@media print {
    #navbar, #mobile-menu, #hero .absolute.bottom-10 {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
