/* =========================================
   AEROS EDGE - UNIFIED ANIMATION CORE (CSS)
   Location: animations/animations.css
========================================= */

/* --- 1. SPLASH SCREEN BASE --- */
#splash-screen {
    position: fixed;
    inset: 0;
    background: #020617; 
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
    overflow: hidden;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* --- 2. TRIPLE-LAYER PARALLAX STARFIELD --- */
.starfield {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.star-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%; 
    background: transparent;
    will-change: transform;
}

.star-layer:nth-child(1) {
    background-image: 
        radial-gradient(1px 1px at 25px 50px, #fff, transparent),
        radial-gradient(1px 1px at 150px 150px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 300px 400px, var(--accent-cyan), transparent);
    background-size: 400px 400px;
    animation: moveStars 15s linear infinite;
    opacity: 0.3;
}

.star-layer:nth-child(2) {
    background-image: 
        radial-gradient(1.5px 1.5px at 100px 200px, #fff, transparent),
        radial-gradient(2px 2px at 400px 500px, var(--accent-purple), transparent),
        radial-gradient(1.5px 1.5px at 600px 100px, #fff, transparent);
    background-size: 600px 600px;
    animation: moveStars 25s linear infinite;
    opacity: 0.5;
}

.star-layer:nth-child(3) {
    background-image: 
        radial-gradient(2px 2px at 50px 150px, #fff, transparent),
        radial-gradient(2.5px 2.5px at 350px 350px, var(--accent-cyan), transparent),
        radial-gradient(2px 2px at 500px 10px, #fff, transparent);
    background-size: 800px 800px;
    animation: moveStars 40s linear infinite;
    opacity: 0.8;
}

@keyframes moveStars {
    from { transform: translateY(0); }
    to { transform: translateY(-800px); }
}

/* --- 3. SHOOTING STARS --- */
.shooting-star {
    position: absolute;
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: rotate(-45deg);
    animation: shoot 1.5s ease-out forwards;
    z-index: 0;
    pointer-events: none;
}

@keyframes shoot {
    0% { transform: rotate(-45deg) translateX(0); opacity: 1; }
    100% { transform: rotate(-45deg) translateX(-1000px); opacity: 0; }
}

/* --- 4. SPLASH LOGO & LOADING BAR --- */
.splash-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    opacity: 0;
    transform: scale(0.5);
    animation: splashLogoAnim 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.splash-loading-bar-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    opacity: 0;
    animation: splashFadeIn 0.5s ease forwards 0.8s;
}

.splash-loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #8b5cf6);
    box-shadow: 0 0 15px #06b6d4;
    border-radius: 10px;
    animation: splashLoad 2s cubic-bezier(0.7, 0, 0.3, 1) forwards 1s;
}

.splash-text {
    color: #06b6d4;
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: 4px;
    opacity: 0;
    animation: splashFadeIn 0.5s ease forwards 0.8s, blink 1s step-end infinite;
}

@keyframes splashLogoAnim {
    0% { opacity: 0; transform: scale(0.5); filter: blur(15px); }
    50% { opacity: 1; transform: scale(1.1); filter: blur(0px); }
    100% { opacity: 1; transform: scale(1.3); filter: blur(0px); } 
}

@keyframes splashFadeIn { to { opacity: 1; } }

@keyframes splashLoad {
    0% { width: 0%; }
    40% { width: 50%; }
    70% { width: 80%; }
    100% { width: 100%; }
}

/* --- 5. TYPOGRAPHY & INTERACTIVE EFFECTS --- */
@keyframes textLiquidShine { to { background-position: 200% center; } }
@keyframes textLiquidShineSlow { 
    0% { background-position: 0% center; } 
    100% { background-position: 200% center; } 
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

@keyframes swooshPulse { 
    0%, 100% { filter: drop-shadow(0 0 2px rgba(0, 229, 255, 0.4)); transform: scale(1) translate(0, 0); } 
    50% { filter: drop-shadow(0 0 15px rgba(0, 229, 255, 1)); transform: scale(1.02) translate(2px, -2px); } 
}

@keyframes pixelBlink { 
    0% { opacity: 0.1; transform: translateY(0); } 
    100% { opacity: 1; transform: translateY(-5px); fill: #ffffff; } 
}

@keyframes floaty { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }

/* --- 6. REVEAL UTILITIES (Triggered by JS) --- */
.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); 
}
.reveal.active { opacity: 1; transform: translateY(0); }

.reveal-left { 
    opacity: 0; 
    transform: translateX(-30px); 
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); 
}
.reveal-left.active { opacity: 1; transform: translateX(0); }

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

.tilt-card { 
    perspective: 1000px; 
    transform-style: preserve-3d; 
    transition: transform 0.1s ease-out;
}
.floating-icon { animation: floaty 4s ease-in-out infinite; }

/* ==========================================
   7. SHARED MOTION VARIANTS (ICONS & HOVER)
========================================== */
@keyframes reactFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.react-float { animation: reactFloat 4s ease-in-out infinite; }

@keyframes laptopPulseGlow { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.3)); } 50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(34, 211, 238, 0.8)); } }
.laptop-pulse { animation: laptopPulseGlow 3s ease-in-out infinite; }

@keyframes handshakeShake { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(10deg); } 75% { transform: rotate(-10deg); } }
.handshake-shake { animation: handshakeShake 2s ease-in-out infinite; }

@keyframes certPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.cert-pulse { animation: certPulse 2s ease-in-out infinite; }

@keyframes globeBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.globe-bounce { animation: globeBounce 2s ease-in-out infinite; }

.hover-lift { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.hover-lift:hover { transform: scale(1.05) translateY(-10px); z-index: 50; box-shadow: 0 20px 40px rgba(0,0,0,0.8); }

/* ==========================================
   8. WAVING ENTRANCE (LEFT AND RIGHT CARDS)
========================================== */
.reveal.wave-in-card.active {
    animation: cardWaveInLeft 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both !important;
    transition: none !important; 
}

.reveal.wave-in-card-right.active {
    animation: cardWaveInRight 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both !important;
    transition: none !important; 
}

@keyframes cardWaveInLeft {
    0% { transform: translateX(-250px) translateY(50px) rotate(-15deg); opacity: 0; }
    45% { transform: translateX(30px) translateY(0) rotate(15deg); opacity: 1; }
    65% { transform: translateX(-15px) translateY(0) rotate(-8deg); opacity: 1; }
    85% { transform: translateX(8px) translateY(0) rotate(3deg); opacity: 1; }
    100% { transform: translateX(0) translateY(0) rotate(0deg); opacity: 1; }
}

@keyframes cardWaveInRight {
    0% { transform: translateX(250px) translateY(50px) rotate(15deg); opacity: 0; }
    45% { transform: translateX(-30px) translateY(0) rotate(-15deg); opacity: 1; }
    65% { transform: translateX(15px) translateY(0) rotate(8deg); opacity: 1; }
    85% { transform: translateX(-8px) translateY(0) rotate(3deg); opacity: 1; }
    100% { transform: translateX(0) translateY(0) rotate(0deg); opacity: 1; }
}

/* ==========================================
   9. POP-OUT FAN SEQUENCE DYNAMICS (LEADERSHIP)
========================================== */
@keyframes popInLeader { 
    0% { transform: scale(0.5); opacity: 0; } 
    100% { transform: scale(1); opacity: 1; } 
}
@keyframes popOutLeft { 
    0% { transform: translate(0, 0) scale(0.5); opacity: 0; } 
    50% { opacity: 1; } 
    100% { transform: translate(-340px, 140px) scale(1); opacity: 1; } 
}
@keyframes popOutRight { 
    0% { transform: translate(0, 0) scale(0.5); opacity: 0; } 
    50% { opacity: 1; } 
    100% { transform: translate(340px, 140px) scale(1); opacity: 1; } 
}
@keyframes popOutBottom { 
    0% { transform: translate(0, 0) scale(0.5); opacity: 0; } 
    50% { opacity: 1; } 
    100% { transform: translate(0, 340px) scale(1); opacity: 1; } 
}

.leadership-ecosystem-section.active .leader-wrapper { animation: popInLeader 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.2s; }
.leadership-ecosystem-section.active .fan-card-1 { animation: popOutLeft 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.7s; }
.leadership-ecosystem-section.active .fan-card-2 { animation: popOutRight 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.9s; }
.leadership-ecosystem-section.active .fan-card-3 { animation: popOutBottom 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 1.1s; }

/* ==========================================
   10. PORTFOLIO CARD DEALING LOOP
========================================== */
@media (min-width: 993px) {
    .portfolio-grid-anim { position: relative; }
    .portfolio-grid-anim:hover .card-dealer-wrap { animation-play-state: paused !important; }

    .portfolio-card-1 { z-index: 3; animation: dealLoopCard1 12s infinite cubic-bezier(0.2, 0.8, 0.2, 1); }
    .portfolio-card-2 { z-index: 2; animation: dealLoopCard2 12s infinite cubic-bezier(0.2, 0.8, 0.2, 1); }
    .portfolio-card-3 { z-index: 1; animation: dealLoopCard3 12s infinite cubic-bezier(0.2, 0.8, 0.2, 1); }

    @keyframes dealLoopCard1 {
        0%, 60% { transform: translateX(0) scale(1) translateY(0); opacity: 1; }
        65% { transform: translateX(calc(100% + 2rem)) scale(1) translateY(0); opacity: 1; }
        70%, 85% { transform: translateX(calc(200% + 4rem)) scale(1) translateY(0); opacity: 1; }
        88% { transform: translateX(calc(200% + 4rem)) scale(1) translateY(0); opacity: 0; }
        89% { transform: translateX(0) scale(1) translateY(0); opacity: 0; }
        95%, 100% { transform: translateX(0) scale(1) translateY(0); opacity: 1; }
    }

    @keyframes dealLoopCard2 {
        0%, 15% { transform: translateX(calc(-100% - 2rem)) scale(0.95) translateY(15px); opacity: 0.8; }
        25%, 65% { transform: translateX(0) scale(1) translateY(0); opacity: 1; }
        70%, 85% { transform: translateX(calc(100% + 2rem)) scale(0.95) translateY(15px); opacity: 0.8; }
        88% { transform: translateX(calc(100% + 2rem)) scale(0.95) translateY(15px); opacity: 0.8; }
        89% { transform: translateX(calc(-100% - 2rem)) scale(0.95) translateY(15px); opacity: 0.8; }
        95%, 100% { transform: translateX(calc(-100% - 2rem)) scale(0.95) translateY(15px); opacity: 0.8; }
    }

    @keyframes dealLoopCard3 {
        0%, 10% { transform: translateX(calc(-200% - 4rem)) scale(0.9) translateY(30px); opacity: 0.6; }
        20%, 85% { transform: translateX(0) scale(1) translateY(0); opacity: 1; }
        88% { transform: translateX(0) scale(1) translateY(0); opacity: 0; }
        89% { transform: translateX(calc(-200% - 4rem)) scale(0.9) translateY(30px); opacity: 0; }
        95%, 100% { transform: translateX(calc(-200% - 4rem)) scale(0.9) translateY(30px); opacity: 0.6; }
    }
}

/* ==========================================
   11. MOBILE LEADERSHIP FALLBACK
========================================== */
@media (max-width: 992px) {
    .desktop-leadership { display: none !important; }
    .leadership-ecosystem-section { padding: 0 20px; }
    .mobile-leadership { display: block !important; }
}
@media (min-width: 993px) {
    .mobile-leadership { display: none !important; }
}

/* ==========================================
   12. MISSION STATEMENT ANIMATIONS
========================================== */
@keyframes missionGlowPulse {
    0%, 100% { opacity: 0.1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.3; transform: translateX(-50%) scale(1.15); }
}

.mission-glow-orb {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 120px;
    background: var(--accent-cyan);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    animation: missionGlowPulse 6s ease-in-out infinite;
}

.mission-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 4rem;
    border-top: 2px solid var(--accent-cyan);
    position: relative;
    overflow: hidden;
}

.mission-text {
    font-size: 1.3rem;
    line-height: 1.9;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* ==========================================
   13. CINEMATIC PROJECT CARDS (COMPLETED WORK)
========================================== */
.project-card {
    border: 1px solid var(--glass-border);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
}

.project-card:hover {
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 242, 255, 0.15);
    transform: translateY(-10px);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}
.project-card:hover .project-img {
    transform: scale(1.12);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 1));
    z-index: 1;
    transition: opacity 0.5s ease;
}
.project-card:hover .project-overlay {
    opacity: 0.6;
}

.project-category {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    transition: transform 0.4s ease, color 0.4s ease;
}
.project-card:hover .project-category {
    color: var(--accent-purple); 
    transform: translateY(-2px);
}

.project-title {
    transition: color 0.3s ease;
}
.project-card:hover .project-title {
    color: var(--accent-cyan) !important;
}

.project-arrow {
    color: var(--accent-cyan);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.project-card:hover .project-arrow {
    opacity: 1;
    transform: translateX(0); 
}

/* ==========================================
   14. FOOTER CYBER WAVES & STYLING
========================================== */
:root {
    --footer-bg: #020204;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --glass-border: rgba(255, 255, 255, 0.08);
}

.ae-footer {
    position: relative;
    background: linear-gradient(180deg, transparent, var(--footer-bg) 40%);
    color: #e5e7eb;
    padding: 80px 20px 30px;
    margin-top: 100px;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* --- THE SCANNING LINE WAS REMOVED FROM HERE (.ae-footer::before) --- */

.ae-footer::after {
    content: '';
    position: absolute;
    bottom: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: footerBreathe 8s ease-in-out infinite alternate;
}

.ae-footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.ae-logo {
    margin-bottom: 15px;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.ae-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 25px;
}

.ae-footer-col h4 {
    color: var(--accent-cyan);
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.ae-footer-col ul {
    list-style: none;
    padding: 0;
}

.ae-footer-col ul li {
    margin-bottom: 12px;
}

.ae-footer-col ul li a {
    position: relative;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ae-footer-col ul li a::before {
    content: '▹';
    position: absolute;
    left: -15px;
    color: var(--accent-cyan);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ae-footer-col ul li a:hover {
    color: var(--accent-cyan);
    padding-left: 18px;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.ae-footer-col ul li a:hover::before {
    opacity: 1;
    left: 0;
    text-shadow: 0 0 15px rgba(6, 182, 212, 1);
}

.ae-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-right: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ae-socials a:hover {
    background: var(--accent-cyan);
    color: #fff;
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.3);
    border-color: var(--accent-cyan);
}

.ae-footer-bottom {
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
    padding-top: 25px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-cyber-waves,
.footer-cyber-waves::before,
.footer-cyber-waves::after {
    position: absolute;
    top: 0;
    left: -10%; 
    width: 120%; 
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.footer-cyber-waves {
    background-image: 
        radial-gradient(4px 4px at 40px 60px, #fff 20%, var(--accent-cyan) 80%, transparent),
        radial-gradient(5px 5px at 120px 140px, #fff 20%, var(--accent-purple) 80%, transparent),
        radial-gradient(3px 3px at 250px 80px, var(--accent-cyan) 90%, transparent),
        radial-gradient(5px 5px at 320px 20px, rgba(139, 92, 246, 0.9), transparent),
        radial-gradient(6px 6px at 400px 110px, #fff 10%, var(--accent-cyan) 50%, var(--accent-purple) 90%, transparent);
    background-size: 450px 300px;
    animation: riseUp1 7s linear infinite, waveSway1 6s ease-in-out infinite alternate;
}

.footer-cyber-waves::before {
    content: '';
    background-image: 
        radial-gradient(3px 3px at 20px 90px, var(--accent-cyan) 80%, transparent),
        radial-gradient(4px 4px at 180px 30px, var(--accent-purple) 90%, transparent),
        radial-gradient(4px 4px at 290px 150px, #fff 30%, var(--accent-cyan) 80%, transparent),
        radial-gradient(5px 5px at 380px 50px, rgba(139, 92, 246, 0.8), transparent);
    background-size: 350px 250px;
    animation: riseUp2 10s linear infinite, waveSway2 8s ease-in-out infinite alternate-reverse;
}

.footer-cyber-waves::after {
    content: '';
    background-image: 
        radial-gradient(4px 4px at 80px 40px, rgba(6, 182, 212, 0.8), transparent),
        radial-gradient(5px 5px at 220px 110px, rgba(139, 92, 246, 0.9), transparent),
        radial-gradient(4px 4px at 340px 70px, rgba(6, 182, 212, 0.7), transparent);
    background-size: 250px 200px;
    filter: blur(1.5px);
    animation: riseUp3 14s linear infinite, waveSway3 10s ease-in-out infinite alternate;
}

@keyframes riseUp1 {
    0% { background-position: 0px 300px; }
    100% { background-position: 0px 0px; }
}
@keyframes riseUp2 {
    0% { background-position: 0px 250px; }
    100% { background-position: 0px 0px; }
}
@keyframes riseUp3 {
    0% { background-position: 0px 200px; }
    100% { background-position: 0px 0px; }
}

@keyframes waveSway1 {
    0% { transform: translateX(-25px); }
    100% { transform: translateX(25px); }
}
@keyframes waveSway2 {
    0% { transform: translateX(-35px); }
    100% { transform: translateX(35px); }
}
@keyframes waveSway3 {
    0% { transform: translateX(-15px); }
    100% { transform: translateX(15px); }
}

@keyframes footerBreathe { 0% { transform: translateX(-50%) scale(1); opacity: 0.4; } 100% { transform: translateX(-50%) scale(1.1); opacity: 0.8; } }