/* Custom styles for pSemi Corporation */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar styles */
.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

/* Navbar scrolled state */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.06);
}

.navbar-scrolled .nav-logo-text {
    color: #102a43;
}

.navbar-scrolled .nav-link {
    color: #334e68;
}

.navbar-scrolled .nav-link:hover {
    color: #102a43;
}

.navbar-scrolled .menu-line {
    background-color: #102a43;
}

/* Mobile menu */
.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 button active state */
.menu-btn-active .menu-line:first-child {
    transform: rotate(45deg) translate(2px, 2px);
}

.menu-btn-active .menu-line:last-child {
    transform: rotate(-45deg) translate(2px, -2px);
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px #3dbfa8;
}

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

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

::-webkit-scrollbar-thumb {
    background: #9fb3c8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}
