/* 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: rgba(20, 184, 166, 0.2);
    color: #0d1528;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0d1528;
}
::-webkit-scrollbar-thumb {
    background: #2dd4bf;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* Scroll animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Scroll down animation */
@keyframes scrollDown {
    0% { top: 0; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}
.animate-scroll-down {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* Service card icon color transition */
.service-icon {
    color: #14b8a6;
    transition: color 0.5s ease;
}
.service-card:hover .service-icon {
    color: #5eead4;
}
.service-title {
    transition: color 0.5s ease;
}
.service-desc {
    transition: color 0.5s ease;
}
.service-card:hover .service-title {
    color: #ffffff;
}
.service-card:hover .service-desc {
    color: rgba(255, 255, 255, 0.6);
}

/* Navbar transition */
.nav-logo-text {
    transition: color 0.5s ease;
}
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #5eead4;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Menu lines animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Input autofill override */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(255,255,255,0.05) inset !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Focus visible */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5eead4;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}
