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

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

body {
    margin: 0;
}

::selection {
    background: rgba(52, 212, 184, 0.3);
    color: #fff;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #1fb89a44;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1fb89a77;
}

/* ─── Navbar ─── */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled a:not([class*="bg-mint"]) {
    color: rgba(255, 255, 255, 0.85) !important;
}

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

#mobileMenu.closing {
    opacity: 0;
    pointer-events: none;
}

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

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

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

/* ─── Room Cards ─── */
.room-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: border-color 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.room-card:hover::before {
    border-color: rgba(52, 212, 184, 0.4);
}

.room-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    z-index: 2;
    pointer-events: none;
}

/* ─── Amenity Items ─── */
.amenity-item {
    transform: translateY(0);
}

.amenity-item:hover {
    transform: translateY(-2px);
}

/* ─── Reveal Animations ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ─── Hero Text Animation ─── */
.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-badge {
    opacity: 0;
    animation: fadeIn 0.8s ease 0.1s forwards;
}

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

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ─── Pulse Ring on Geometric Shapes ─── */
@keyframes pulseRing {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.geometric-pulse {
    animation: pulseRing 3s ease-in-out infinite;
}

/* ─── Floating Animation ─── */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-10px) rotate(12deg); }
}

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

/* ─── Gradient Border ─── */
.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(52,212,184,0.4), rgba(52,212,184,0.05), rgba(52,212,184,0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ─── Input Focus Ring ─── */
input:focus, textarea:focus {
    outline: none;
}

/* ─── Responsive Tweaks ─── */
@media (max-width: 767px) {
    .font-playfair {
        font-size: clamp(2rem, 8vw, 3.5rem) !important;
    }

    #hero h1 {
        font-size: clamp(2.5rem, 10vw, 4.5rem) !important;
    }
}
