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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(232, 98, 84, 0.3);
    color: #f6f6f6;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #111111;
}
::-webkit-scrollbar-thumb {
    background: #353535;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e86254;
}

/* === Skip Link === */
.skip-link {
    z-index: 9999;
}

/* === Navbar === */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #e86254;
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-blur-xl;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* === Burger Menu === */
.burger-line {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#menu-toggle[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.25rem;
}

/* === Mobile Menu === */
.mobile-link {
    display: block;
}

/* === Buttons === */
.btn-reserved {
    position: relative;
    overflow: hidden;
}
.btn-reserved::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}
.btn-reserved:hover::before {
    left: 100%;
}

/* === Scroll Indicator === */
.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #e86254, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* === Floating Cards === */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(-0.5deg); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.3deg); }
}

.floating-card-1 {
    animation: float1 6s ease-in-out infinite;
}
.floating-card-2 {
    animation: float2 7s ease-in-out infinite;
}
.floating-card-3 {
    animation: float3 5.5s ease-in-out infinite;
}

/* === Room Cards === */
.room-card .bg-gradient-to-t {
    transition: opacity 0.5s ease;
}
.room-card:hover .bg-gradient-to-t {
    opacity: 0.7;
}

/* === Amenity Cards === */
.amenity-card {
    transition: transform 0.4s ease;
}
.amenity-card:hover {
    transform: translateY(-4px);
}

/* === Scroll Reveal === */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Back to Top === */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top:hover {
    box-shadow: 0 8px 30px rgba(232, 98, 84, 0.4);
}

/* === Focus Styles === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e86254;
    outline-offset: 2px;
}

/* === Responsive adjustments === */
@media (max-width: 640px) {
    .floating-card-1 {
        width: 56px !important;
        right: 0 !important;
    }
    .floating-card-2 {
        width: 52px !important;
        left: 0 !important;
    }
    .floating-card-3 {
        width: 52px !important;
        right: 4px !important;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .floating-card-1 {
        width: 16rem;
    }
    .floating-card-2 {
        width: 15rem;
    }
    .floating-card-3 {
        width: 14rem;
    }
}
