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

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: #FEFDFB;
    color: #3D2B1F;
    overflow-x: hidden;
}

/* Custom clip for hero */
.clip-diagonal-right {
    clip-path: polygon(30% 0%, 100% 0, 100% 100%, 0% 100%);
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(61, 43, 31, 0.08);
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

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

/* Hamburger animation */
#menuBtn.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px;
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.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; }

/* Geometric accent animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-12px) rotate(12deg); }
}

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

.float-1 { animation: float 6s ease-in-out infinite; }
.float-2 { animation: float-slow 8s ease-in-out infinite; }

/* Selection color */
::selection {
    background: #C75B39;
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f0;
}
::-webkit-scrollbar-thumb {
    background: #d4b4a6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C75B39;
}

/* Form select 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='%233D2B1F' stroke-width='2.5' 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;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .clip-diagonal-right {
        clip-path: polygon(15% 0%, 100% 0, 100% 100%, 0% 100%);
    }
}

@media (max-width: 640px) {
    .clip-diagonal-right {
        clip-path: polygon(0% 0%, 100% 0, 100% 100%, 0% 100%);
    }
    
    h1 {
        font-size: 2.75rem !important;
    }
    
    h2 {
        font-size: 2.25rem !important;
    }
}
