/* ===== Base & Reset ===== */
*, *::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: #065f46;
    color: #f5f0e8;
}

/* ===== Marquee Animation ===== */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* ===== Hero Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-anim {
    animation: fadeUp 0.8s ease-out both;
}

.hero-anim:nth-child(2) { animation-delay: 0.15s; }
.hero-anim:nth-child(3) { animation-delay: 0.3s; }
.hero-anim:nth-child(4) { animation-delay: 0.45s; }
.hero-anim:nth-child(5) { animation-delay: 0.6s; }

.hero-img-anim {
    animation: scaleIn 1s ease-out 0.3s both;
}

/* ===== Section Reveal ===== */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* ===== Service Cards ===== */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ===== About Image ===== */
.about-img-anim {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.about-img-anim.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(245, 240, 232, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

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

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

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

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

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

/* ===== Hamburger Animation ===== */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active #bar2 {
    opacity: 0;
}

#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== Custom 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='%23065f46' 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;
}

/* ===== Smooth Scroll Offset ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ===== Focus Visible ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #065f46;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== 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;
    }

    .section-reveal,
    .service-card,
    .hero-anim,
    .hero-img-anim,
    .about-img-anim {
        opacity: 1;
        transform: none;
    }

    .animate-marquee {
        animation: none;
    }
}
