/**
 * Custom CSS for Tech Security Integration Website
 * Contains animations and special effects not covered by Tailwind CSS
 * 
 * @author Tech Security Integration Development Team
 * @version 1.0.0
 */

/* Custom Properties */
:root {
    --primary-black: #000;
    --primary-white: #fff;
    --section-divider: #f3f3f3;
    --text-secondary: #555;
    --text-muted: #999;
    --border-light: #e6e6e6;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Custom Cursor Enhancements */
.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.5) !important;
    background: transparent !important;
    border-width: 1px !important;
}

/* Particle Animation */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { 
        transform: translateY(100vh) rotate(0deg); 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-100vh) rotate(360deg); 
        opacity: 0; 
    }
}

/* Hero Background Parallax */
.hero-bg {
    transition: transform 0.1s ease-out;
}

/* Video Background Specific Styles */
.hero-bg video {
    /* Ensure video covers the entire container */
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

/* Ensure video doesn't interfere with pointer events */
.hero-bg {
    pointer-events: none;
}

/* Glass Morphism Effects */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Enhanced Card Hover Effects */
.product-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover {
    transform: translateY(-12px) rotateX(5deg);
}

.stat-item,
.trust-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stat-item:hover,
.trust-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Enhanced Button Effects */
.cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button::after {
    content: '→';
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.cta-button:hover::after {
    transform: translateX(5px);
}

/* Form Enhancements */
.form-floating {
    position: relative;
}

.form-floating input,
.form-floating textarea {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating textarea:focus ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Loading States */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Section Dividers */
.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-black) 50%, transparent 100%);
    transform: skewY(1deg);
}

/* Product Image Overlays */
.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image::after {
    opacity: 1;
}

/* Trust Item Top Border */
.trust-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-black) 0%, #333 100%);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .particle {
        display: none; /* Disable particles on mobile for performance */
    }
    
    .custom-cursor {
        display: none; /* Hide custom cursor on mobile */
    }
    
    .product-card:hover {
        transform: translateY(-5px); /* Reduce hover effect on mobile */
    }
    
    /* Optimize video for mobile */
    .hero-bg video {
        /* Use poster image on mobile to save bandwidth */
        object-fit: cover;
    }
    
    /* Consider pausing video on mobile for better performance */
    .hero-bg {
        opacity: 0.15; /* Slightly more transparent on mobile */
    }
}

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .particle {
        display: none;
    }
}

/* Focus States for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Logo Styles */
.logo-image {
    transition: all 0.3s ease;
    filter: brightness(1);
}

.logo-image:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: #000;
        --text-muted: #333;
    }
}
