/* ============================================
   MMGCYBERSEC — Animations
   Keyframes, Scroll Reveals, Effects
   ============================================ */

/* Pulse effect for status indicator */
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
}

/* Glow pulse for accent elements */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.2); }
    50% { box-shadow: 0 0 40px rgba(0, 240, 255, 0.4); }
}

/* Typing cursor */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Scan line effect */
@keyframes scanline {
    0% { top: -10%; }
    100% { top: 110%; }
}

.scan-effect::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.15;
    animation: scanline 4s linear infinite;
    pointer-events: none;
}

/* Counter animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.3s; }

/* ============================================
   HERO ENTRANCE ANIMATIONS
   ============================================ */

.hero-badge {
    animation: fadeSlideUp 0.8s ease 0.2s both;
}

.hero h1 {
    animation: fadeSlideUp 0.8s ease 0.4s both;
}

.hero-subtitle {
    animation: fadeSlideUp 0.8s ease 0.6s both;
}

.hero-actions {
    animation: fadeSlideUp 0.8s ease 0.8s both;
}

.hero-stats {
    animation: fadeSlideUp 0.8s ease 1s both;
}

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

/* ============================================
   INTERACTIVE HOVER EFFECTS
   ============================================ */

/* Card hover glow */
.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(0, 240, 255, 0.04),
        transparent 40%
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.service-card:hover::after {
    opacity: 1;
}

/* Button ripple */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.btn:hover::after {
    transform: scaleX(1);
}

/* Terminal typing effect */
.typing-text::after {
    content: '█';
    animation: blink 1s step-end infinite;
    color: var(--accent-cyan);
    margin-left: 2px;
}

/* Glitch text effect for headings */
.glitch {
    position: relative;
}

.glitch:hover {
    animation: glitch 0.3s ease;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(2px, -1px); }
    60% { transform: translate(-1px, 2px); }
    80% { transform: translate(1px, -2px); }
}

/* ============================================
   LOADING SCREEN
   ============================================ */

.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-cyan);
    letter-spacing: 3px;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: var(--border-color);
    margin-top: 16px;
    overflow: hidden;
    position: relative;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    animation: loadBar 1.5s ease forwards;
}

@keyframes loadBar {
    to { width: 100%; }
}
