/* ======================================
   AlphaRise Innovation — Animations
   ====================================== */

/* ---------- Floating Card Animation ---------- */
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---------- Fade In Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Scale Animations ---------- */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* ---------- Particle Animation ---------- */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
    opacity: 0.4;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ---------- Typing Cursor ---------- */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #4F46E5;
    margin-left: 2px;
    animation: blink 0.8s ease-in-out infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---------- Gradient Border Animation ---------- */
@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- Glow Pulse ---------- */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(79, 70, 229, 0.2); }
    50% { box-shadow: 0 0 40px rgba(79, 70, 229, 0.4), 0 0 60px rgba(6, 182, 212, 0.2); }
}

/* ---------- Scroll Reveal Classes ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ---------- Hover Lift Effect ---------- */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* ---------- Shimmer Effect ---------- */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* ---------- Smooth Entrance for Navbar Links ---------- */
.nav-link {
    opacity: 1;
    transition: all 0.3s ease;
}

/* ---------- Form Input Focus Animation ---------- */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }
}

/* ---------- Success Form Animation ---------- */
.form-success {
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ---------- Smooth Section Transitions ---------- */
.section {
    opacity: 1;
    transition: opacity 0.6s ease;
}

/* ---------- Reduce Motion Preference ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .particle { display: none; }

    .floating-card { animation: none; }

    .pulse-btn { animation: none; }
    
    html { scroll-behavior: auto; }
}
