/* Custom styles for refined typography and subtle animations */

html {
    scroll-behavior: smooth;
}

body {
    background-color: #ffffff;
    color: #1e293b;
}

/* Smooth reveal animations for scroll sections */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero animations - only below the fold or after load */
.hero-title {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.8s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 1.1s;
}

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

/* Navbar transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

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

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s 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; }

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

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

::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hero-title, .hero-subtitle, .hero-cta {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
