/* ===================================================
   OMERTA DEFENCE - Animations & Transitions
   Premium Redesign with Clip-Path, Focus, 3D Reveals
   =================================================== */

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes logoEntrance {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
        filter: blur(0);
    }
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(61, 143, 167, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(61, 143, 167, 0.6))
               drop-shadow(0 0 30px rgba(61, 143, 167, 0.2));
    }
}

/* ---------- Standard Scroll Reveal Classes ---------- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* ---------- NEW: Clip-Path Reveal ---------- */
.reveal-clip {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
    -webkit-clip-path: inset(100% 0 0 0);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                -webkit-clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-clip.revealed {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
}

/* ---------- NEW: Camera Focus Reveal ---------- */
.reveal-focus {
    opacity: 0;
    transform: scale(1.1);
    filter: blur(8px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-focus.revealed {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* ---------- NEW: 3D Perspective Reveal ---------- */
.reveal-3d {
    opacity: 0;
    transform: perspective(800px) rotateY(-15deg) translateX(-30px);
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-3d.revealed {
    opacity: 1;
    transform: perspective(800px) rotateY(0) translateX(0);
}

/* ---------- NEW: Wipe Reveal ---------- */
.reveal-wipe {
    opacity: 0;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-wipe.revealed {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* ---------- NEW: Line-by-line Stagger Reveal ---------- */
.reveal-line {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-line.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Stagger Delays ---------- */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }
.delay-8 { transition-delay: 0.8s; }

/* ---------- Staggered Product Cards ---------- */
.product-card:nth-child(1) { transition-delay: 0.05s; }
.product-card:nth-child(2) { transition-delay: 0.1s; }
.product-card:nth-child(3) { transition-delay: 0.15s; }
.product-card:nth-child(4) { transition-delay: 0.2s; }
.product-card:nth-child(5) { transition-delay: 0.25s; }

/* ---------- Hero Entrance Animations ---------- */
.hero .reveal-clip {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
    -webkit-clip-path: inset(100% 0 0 0);
}

.hero .reveal-clip.revealed {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
}

/* ---------- Product Card Hover Animations ---------- */
.product-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
}

.product-card .card-image img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Cyber Feature Hover ---------- */
.cyber-feature {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-feature:hover .feature-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* ---------- Nav Transition ---------- */
.navbar {
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* ---------- Button Ripple Effect ---------- */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 10%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s ease;
    border-radius: inherit;
}

.btn:active::after {
    opacity: 1;
    transform: scale(2.5);
    transition: 0s;
}

/* ---------- Image Frame Hover ---------- */
.image-frame {
    transition: all 0.5s ease;
}

.image-frame:hover {
    transform: scale(1.02);
}

/* ---------- About Image Clip-Path Reveal ---------- */
.about-image.reveal-focus .image-frame {
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    transition: clip-path 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.about-image.reveal-focus.revealed .image-frame {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* ---------- Scroll Indicator Pulse ---------- */
.scroll-indicator {
    animation: pulse 2s infinite;
}

/* ---------- Form Focus Animations ---------- */
.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--teal-accent);
    transition: all 0.4s ease;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--teal-glow);
}

.form-group:focus-within::after {
    width: 100%;
}

/* ---------- Link Hover Effects ---------- */
.footer-links a {
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.card-link {
    transition: color 0.3s ease, gap 0.3s ease;
}

/* ---------- Prefers Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-up,
    .reveal-left,
    .reveal-right,
    .reveal-clip,
    .reveal-focus,
    .reveal-3d,
    .reveal-wipe,
    .reveal-line {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        -webkit-clip-path: none !important;
        filter: none !important;
    }

    .hero-particles {
        display: none;
    }
}
