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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
}

::selection {
    background: rgba(255, 107, 74, 0.3);
    color: #f6f6f7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #11141a;
}
::-webkit-scrollbar-thumb {
    background: #404752;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FF6B4A;
}

/* 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.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal.revealed:nth-child(2) { transition-delay: 100ms; }
.reveal.revealed:nth-child(3) { transition-delay: 200ms; }
.reveal.revealed:nth-child(4) { transition-delay: 300ms; }

/* Hero Animations */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-image {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    animation: heroSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

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

/* Geometric Decorative Shapes */
.hero-shape {
    position: absolute;
    pointer-events: none;
}

.shape-circle-1 {
    top: 15%;
    left: 5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(255, 107, 74, 0.08);
    animation: floatShape 8s ease-in-out infinite;
}

.shape-circle-2 {
    bottom: 10%;
    left: 15%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 107, 74, 0.04);
    animation: floatShape 6s ease-in-out infinite reverse;
}

.shape-square-1 {
    top: 25%;
    right: 48%;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(255, 107, 74, 0.1);
    transform: rotate(45deg);
    animation: floatShape 7s ease-in-out infinite;
}

.shape-triangle {
    bottom: 25%;
    right: 45%;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 43px solid rgba(255, 107, 74, 0.06);
    animation: floatShape 9s ease-in-out infinite reverse;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Navbar */
#navbar.scrolled #navBg {
    background: rgba(17, 20, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    border-bottom: 1px solid rgba(64, 71, 82, 0.5);
}

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

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

#mobileMenu .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#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; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Service Cards */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Neighborhood Cards */
.neighborhood-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.neighborhood-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Testimonial Cards */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* CTA Banner */
.cta-banner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-banner.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Nav links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B4A;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23858c96' 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;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #FF6B4A;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal, .service-card, .neighborhood-card, .testimonial-card, .cta-banner {
        opacity: 1;
        transform: none;
    }
    .hero-content, .hero-image {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
