/* Custom CSS for Sigma project */
/* Mobile Menu Animation */
#mobile-menu:not(.hidden) {
    display: block;
    animation: slideDown 0.3s ease-out forwards;
}

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

/* Button & Link Active States */
a:active, button:active {
    transform: scale(0.98);
}

/* Global Transitions & Anti-Flickering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    animation: fadeIn 0.6s ease-out forwards;
}

/* Specific interactive elements transitions */
a, button, input, select, textarea, .card, .hover-effect, [role="button"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent AOS Flickering */
[data-aos] {
    pointer-events: none;
    will-change: transform, opacity;
}
.aos-animate {
    pointer-events: auto;
}

/* Hardware Acceleration for smooth animations */
.smooth-animate {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed navbar */
}

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Back to Top Button */
#backToTop {
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-5px);
}

/* Dark mode glass */
@media (prefers-color-scheme: dark) {
    .glass {
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}
/* Additional shadow utilities */
.shadow-premium {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.08);
}
.shadow-brand {
    box-shadow: 0 10px 30px -5px rgba(83, 102, 255, 0.3);
}

/* Custom Scrollbar for Sidebar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section Dotted Grid Overlay */
.dotted-overlay {
    background-image: radial-gradient(rgba(0,0,0,0.2) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* 4K Enhancement Tricks */
.video-premium-filter {
    filter: contrast(1.1) saturate(1.1) brightness(0.95) sharpness(1.1);
    /* Note: sharpness isn't standard, we use a combination of contrast and scale */
    transform: scale(1.01); /* Menghilangkan jitter di tepi */
}

.noise-overlay {
    position: absolute;
    inset: 0;
    z-index: 11;
    opacity: 0.04; /* Sangat tipis, hanya untuk tekstur */
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.vignette-overlay {
    position: absolute;
    inset: 0;
    z-index: 12;
    pointer-events: none;
    background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.4) 100%);
}
