/* Custom animations and utility styles */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
    opacity: 0;
    animation: slideUp 0.7s ease-out forwards;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-600 {
    animation-delay: 600ms;
}

/* Polygon clip path for hero decoration */
.clip-polygon {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.active > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.active > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.active > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.active > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children.active > *:nth-child(6) { transition-delay: 500ms; }

.stagger-children.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 25, 47, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

::-webkit-scrollbar-track {
    background: #0a192f;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #f6c744;
}

/* Mobile menu transitions */
#mobileMenu {
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

#mobileMenu.closed {
    max-height: 0;
    opacity: 0;
}

/* Hamburger animation */
#mobileMenuBtn.active #line1 {
    transform: translateY(6px) rotate(45deg);
}

#mobileMenuBtn.active #line2 {
    opacity: 0;
}

#mobileMenuBtn.active #line3 {
    transform: translateY(-6px) rotate(-45deg);
}

/* Selection color */
::selection {
    background: rgba(234, 179, 15, 0.3);
    color: #f6c744;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #f6c744;
    outline-offset: 2px;
}

/* Image lazy loading placeholder */
img {
    background: linear-gradient(90deg, #112240 25%, #1a365d 50%, #112240 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

img[src] {
    animation: none;
    background: none;
}
