/* =============================================
   IT.CEA.OR.TH - Animations
   ============================================= */

/* ─── Gradient Shift ─── */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

/* ─── Float ─── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-12px) rotate(2deg);
    }

    66% {
        transform: translateY(-6px) rotate(-1deg);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* ─── Glow Pulse ─── */
@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(167, 139, 250, 0.6), 0 0 60px rgba(103, 232, 249, 0.2);
    }
}

.glow-pulse {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* ─── Typing Cursor ─── */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--color-primary);
    margin-left: 2px;
}

/* ─── Shimmer ─── */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.shimmer-text {
    background: linear-gradient(90deg,
            var(--color-primary) 0%,
            var(--color-secondary) 25%,
            var(--color-accent) 50%,
            var(--color-secondary) 75%,
            var(--color-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ─── Rotate ─── */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ─── Pop In ─── */
@keyframes pop-in {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pop-in {
    animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ─── Slide Up ─── */
@keyframes slide-up {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slide-up 0.6s ease forwards;
}

.slide-up-d1 {
    animation: slide-up 0.6s 0.1s ease both;
}

.slide-up-d2 {
    animation: slide-up 0.6s 0.2s ease both;
}

.slide-up-d3 {
    animation: slide-up 0.6s 0.3s ease both;
}

.slide-up-d4 {
    animation: slide-up 0.6s 0.4s ease both;
}

/* ─── Slide In Left ─── */
@keyframes slide-in-left {
    from {
        transform: translateX(-40px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slide-in-left 0.6s ease forwards;
}

/* ─── Ripple effect ─── */
@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 0.6;
    }

    to {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple-container .ripple {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* ─── Orb Decoration ─── */
.deco-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.deco-orb-1 {
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    top: -100px;
    right: -150px;
    animation-delay: 0s;
}

.deco-orb-2 {
    width: 350px;
    height: 350px;
    background: var(--color-secondary);
    bottom: -80px;
    left: -80px;
    animation-delay: 3s;
}

.deco-orb-3 {
    width: 200px;
    height: 200px;
    background: var(--color-accent);
    top: 40%;
    left: 20%;
    animation-delay: 1.5s;
}

/* ─── Stagger children ─── */
.stagger-children>*:nth-child(1) {
    animation-delay: 0.0s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 0.2s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 0.3s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 0.4s;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 0.5s;
}

/* ─── Loading Skeleton ─── */
@keyframes skeleton-wave {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            rgba(124, 95, 219, 0.05) 25%,
            rgba(124, 95, 219, 0.10) 50%,
            rgba(124, 95, 219, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-wave 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* ─── Hover grow icon ─── */
.hover-grow {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-grow:hover {
    transform: scale(1.15);
}

/* ─── Neon glow border ─── */
.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.neon-border:hover::before {
    opacity: 0.6;
}

/* ─── Page transition ─── */
.page-enter {
    animation: slide-up 0.5s ease forwards;
}

/* ─── Wobble ─── */
@keyframes wobble {

    0%,
    100% {
        transform: rotate(0deg);
    }

    15% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(6deg);
    }

    45% {
        transform: rotate(-4deg);
    }

    60% {
        transform: rotate(2deg);
    }
}

.wobble:hover {
    animation: wobble 0.6s ease;
}