/* ===== 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-color: rgba(45, 212, 168, 0.2);
    color: #0f172a;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0fdf4;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

/* ===== Navbar ===== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(15, 23, 42, 0.06);
}

#navbar.scrolled .font-serif {
    color: #0f172a;
}

/* ===== Mobile Menu ===== */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 1.5rem;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 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; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

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

.hero-images {
    opacity: 0;
    transform: translateX(40px);
    animation: heroImageReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

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

@keyframes heroImageReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Marquee ===== */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Section Header ===== */
.section-header {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.08s; }
.service-card:nth-child(3) { transition-delay: 0.16s; }
.service-card:nth-child(4) { transition-delay: 0.24s; }
.service-card:nth-child(5) { transition-delay: 0.32s; }
.service-card:nth-child(6) { transition-delay: 0.40s; }

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

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

/* ===== Gallery ===== */
.gallery-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-item.revealed {
    opacity: 1;
    transform: scale(1);
}

.gallery-item:nth-child(1) { transition-delay: 0s; }
.gallery-item:nth-child(2) { transition-delay: 0.05s; }
.gallery-item:nth-child(3) { transition-delay: 0.1s; }
.gallery-item:nth-child(4) { transition-delay: 0.15s; }
.gallery-item:nth-child(5) { transition-delay: 0.2s; }
.gallery-item:nth-child(6) { transition-delay: 0.25s; }
.gallery-item:nth-child(7) { transition-delay: 0.3s; }
.gallery-item:nth-child(8) { transition-delay: 0.35s; }

/* ===== Testimonials ===== */
.testimonial-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.testimonial-card:nth-child(1) { transition-delay: 0s; }
.testimonial-card:nth-child(2) { transition-delay: 0.1s; }
.testimonial-card:nth-child(3) { transition-delay: 0.2s; }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-content,
    .hero-images {
        opacity: 1;
        transform: none;
    }
    
    .section-header,
    .service-card,
    .about-images,
    .gallery-item,
    .testimonial-card {
        opacity: 1;
        transform: none;
    }
    
    .marquee-track {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}
