/* Custom CSS for Nabzco Water Solutions */

body {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

body.page-fade-out {
    opacity: 0;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0.15;
    mix-blend-mode: multiply;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.dark .noise-overlay {
    opacity: 0.05;
    mix-blend-mode: screen;
}

/* Focus States */
:focus-visible {
    outline: 2px solid #006C84;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Custom Gradients */
.bg-radial-gradient {
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(224, 242, 254, 0.8) 0%, #F0F9FF 100%);
}

.dark .bg-radial-gradient {
    background: radial-gradient(circle at 50% 0%, rgba(0, 108, 132, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 74, 92, 0.1) 0%, #0F172A 100%);
}

/* Typography Utilities */
.heading-tight {
    letter-spacing: -0.03em;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-100 { transition-delay: 100ms; }
.reveal-delay-200 { transition-delay: 200ms; }

/* Range Slider Styling */
input[type=range] {
    -webkit-appearance: none;
    background: #006C84;
    opacity: 0.2;
    transition: opacity 0.2s;
}
input[type=range]:hover {
    opacity: 0.4;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #004A5C;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 108, 132, 0.5);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
input[type=range]:active::-webkit-slider-thumb {
    transform: scale(0.9);
}

/* Advanced Features CSS */
#progressBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: #006C84;
    z-index: 100;
    width: 0%;
    transition: width 0.1s ease-out;
}

#cursorGlow {
    position: fixed;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 108, 132, 0.08) 0%, rgba(0, 108, 132, 0) 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -5;
}

.dark #cursorGlow {
    background: radial-gradient(circle, rgba(0, 108, 132, 0.15) 0%, rgba(0, 108, 132, 0) 60%);
}

.typewriter-cursor {
    animation: blink 1s step-start infinite;
    color: #006C84;
}

@keyframes blink { 50% { opacity: 0; } }

.magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

/* Marquee Animation */
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 40s linear infinite;
}

/* Blob Animation */
@keyframes pulse-blob {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.8; }
    33% { transform: translate(-45%, -55%) scale(1.1) rotate(5deg); opacity: 1; }
    66% { transform: translate(-55%, -45%) scale(0.9) rotate(-5deg); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.8; }
}

.animate-blob {
    animation: pulse-blob 12s infinite ease-in-out;
}
.animate-blob-delayed {
    animation: pulse-blob 12s infinite ease-in-out 4s;
}

/* 3D Card Flip Utilities */
.perspective-1000 {
    perspective: 1000px;
}
.transform-style-3d {
    transform-style: preserve-3d;
}
.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.rotate-y-180 {
    transform: rotateY(180deg);
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
    width: 14px;
}
::-webkit-scrollbar-track {
    background: #F4FAFC;
}
.dark ::-webkit-scrollbar-track {
    background: #0B151C;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 108, 132, 0.5);
    border-radius: 10px;
    border: 4px solid #F4FAFC;
    background-clip: padding-box;
}
.dark ::-webkit-scrollbar-thumb {
    border: 4px solid #0B151C;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 108, 132, 0.8);
    border: 4px solid #F4FAFC;
    background-clip: padding-box;
}
.dark ::-webkit-scrollbar-thumb:hover {
    border: 4px solid #0B151C;
}

/* Pure CSS Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.8s ease-out;
}
.ripple:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: 0s;
}
