/* =============================================
   CAMELOT APARTMENTS — Custom Styles
   ============================================= */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #6d122c;
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F5;
}
::-webkit-scrollbar-thumb {
    background: #c51a4a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a3133a;
}

/* Hero Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

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

.animate-bounce-slow {
    animation: bounceSlow 2s ease-in-out infinite;
}

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-fade-in-up {
        animation: none;
        opacity: 1;
    }
    
    .animate-bounce-slow {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Mobile Menu */
#mobile-menu {
    transition: opacity 0.5s ease, pointer-events 0.5s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* Hamburger Animation */
#bar1.open {
    transform: translateY(4px) rotate(45deg);
}
#bar2.open {
    opacity: 0;
}
#bar3.open {
    transform: translateY(-4px) rotate(-45deg);
}

/* Navbar transitions */
.nav-scrolled {
    background-color: rgba(250, 247, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* Image hover zoom */
.overflow-hidden {
    will-change: transform;
}

/* Form focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(109, 18, 44, 0.08);
}

/* Card hover lift */
.group:hover .group-hover\!scale-105 {
    transform: scale(1.05);
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Decorative line animation */
@keyframes expandLine {
    from { width: 0; }
    to { width: 100%; }
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Print styles */
@media print {
    nav, #mobile-menu, .animate-bounce-slow {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
