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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Scrollbar for dark areas */
.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

/* Navbar Transition */
.nav-scrolled {
    background: rgba(4, 47, 46, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .nav-logo-text {
    color: #ffffff !important;
}

.nav-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.nav-scrolled .mobile-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Mobile Menu States */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Hamburger Animation */
.menu-open #bar1 {
    transform: translateY(4px) rotate(45deg);
}
.menu-open #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
.menu-open #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

/* Scroll Animations */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    .animate-scroll-down {
        animation: none;
        opacity: 0.6;
    }
}

/* Hero Animations */
@keyframes scroll-down {
    0% {
        top: -16px;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: calc(100% + 16px);
        opacity: 0;
    }
}

.animate-scroll-down {
    animation: scroll-down 1.5s ease-in-out infinite;
}

/* Hero entrance */
#heroBadge {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#heroTitle {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#heroSubtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#heroCTA {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Hover lift for cards */
.group:hover {
    transform: translateY(-4px);
}

/* Smooth focus styles */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #134e4a;
}

/* Print styles */
@media print {
    nav, #hero, #gallery, .animate-scroll-down {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
