/* === BASE === */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(5, 150, 105, 0.15);
    color: #064E3B;
}

/* === NAVBAR === */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.06);
}

/* === MOBILE MENU === */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

#menuBtn.active #menuIcon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
#menuBtn.active #menuIcon span:nth-child(2) {
    opacity: 0;
}
#menuBtn.active #menuIcon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === HERO === */
.hero-content {
    opacity: 0;
    transform: translateY(24px);
    animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-card {
    opacity: 0;
    transform: translateY(32px) scale(0.98);
    animation: heroCardReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

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

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

/* === FLOATING CARDS === */
.float-card {
    opacity: 0;
    animation: floatCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.float-card-1 { animation-delay: 0.6s; }
.float-card-2 { animation-delay: 0.8s; }
.float-card-3 { animation-delay: 1.0s; }

@keyframes floatCardIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gentle floating animation */
.float-card-1 {
    animation: floatCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards, float1 4s ease-in-out 1.4s infinite;
}
.float-card-2 {
    animation: floatCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards, float2 5s ease-in-out 1.6s infinite;
}
.float-card-3 {
    animation: floatCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.0s forwards, float3 4.5s ease-in-out 1.8s infinite;
}

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

@keyframes float2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* === SECTION REVEAL (below fold) === */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* === SERVICE CARDS === */
.service-card {
    transition: background-color 0.5s ease, transform 0.3s ease;
}

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

/* === TIMELINE === */
.timeline-dot {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-dot:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(5, 150, 105, 0.08);
}

/* === FORM === */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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='%23047857' 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;
    appearance: none;
    -webkit-appearance: none;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #D1FAE5;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A7F3D0;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .float-card {
        animation: none !important;
        opacity: 1 !important;
    }
    
    .hero-content,
    .hero-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .float-card-3 {
        display: none;
    }
}
