/* Custom styles for Rising Phoenix Homes */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: rgba(229, 77, 59, 0.2);
    color: #8c2219;
}

/* Floating animations for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

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

.floating-card-2 {
    animation: float-slow 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Card hover effect */
.card-hover {
    transform: translateY(0);
}

.card-hover:hover {
    transform: translateY(-4px);
}

/* Reveal animations - progressive enhancement via prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: content is visible without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(254, 254, 248, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #f3a392, #e54d3b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #e54d3b, #d13625);
}

/* Smooth focus styles */
*:focus-visible {
    outline: 2px solid #e54d3b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Image lazy loading fade */
img {
    transition: opacity 0.3s ease;
}

/* Print styles */
@media print {
    nav, #back-to-top, .floating-card, .floating-card-2 {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
