/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Hero animations - only for below-fold content, hero is always visible */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-anim:nth-child(1) { transition-delay: 0.1s; }
.hero-anim:nth-child(2) { transition-delay: 0.3s; }
.hero-anim:nth-child(3) { transition-delay: 0.5s; }
.hero-anim:nth-child(4) { transition-delay: 0.7s; }

/* Reveal animations - below fold only, progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(4, 47, 46, 0.95);
    backdrop-filter: blur(12px);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-line {
    transition: all 0.3s ease;
}

#menu-btn.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .nav-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .nav-line:nth-child(3) {
    width: 16px;
    transform: rotate(-45deg) translate(3px, -3px);
}

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

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

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

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

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

/* Image hover effects */
img {
    display: block;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}
