/* ============================================
   UBRIXY THEME - Animations
   ============================================ */

/* ── Keyframe Animations ────────────────── */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

@keyframes barGrow {
    0% { height: 0; opacity: 0; }
    100% { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes slideInFromLeft {
    0% { transform: translateX(-30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

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

@keyframes ripple {
    0% { transform: scale(0); opacity: 0.5; }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(101, 106, 229, 0.2); }
    50% { box-shadow: 0 0 40px rgba(101, 106, 229, 0.4); }
}

@keyframes dash {
    to { stroke-dashoffset: 0; }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* ── Scroll Reveal Animations ───────────── */

[data-animate] {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].is-visible {
    opacity: 1;
}

/* Fade Up */
[data-animate="fade-up"] {
    transform: translateY(40px);
}

[data-animate="fade-up"].is-visible {
    transform: translateY(0);
}

/* Fade Down */
[data-animate="fade-down"] {
    transform: translateY(-40px);
}

[data-animate="fade-down"].is-visible {
    transform: translateY(0);
}

/* Fade Left */
[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate="fade-left"].is-visible {
    transform: translateX(0);
}

/* Fade Right */
[data-animate="fade-right"] {
    transform: translateX(-40px);
}

[data-animate="fade-right"].is-visible {
    transform: translateX(0);
}

/* Scale */
[data-animate="scale"] {
    transform: scale(0.9);
}

[data-animate="scale"].is-visible {
    transform: scale(1);
}

/* ── Hover Micro-interactions ───────────── */

/* Magnetic Button Effect (applied via JS) */
.btn {
    transition: all var(--transition-base), transform 0.15s ease-out;
}

/* Card Tilt Effect */
.product-card,
.service-card,
.mission-card,
.feature-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Link Underline Animation */
.footer__list a,
.contact-info__item a {
    position: relative;
}

.footer__list a::after,
.contact-info__item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--transition-base);
}

.footer__list a:hover::after,
.contact-info__item a:hover::after {
    width: 100%;
}

/* Icon Spin on Hover */
.service-card:hover .service-card__icon svg,
.perk-card:hover .perk-card__icon svg {
    animation: scaleIn 0.4s ease-out;
}

/* ── Loading Skeleton ───────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-50) 50%, var(--color-gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* ── Smooth Page Transitions ────────────── */
.main {
    animation: fadeInUp 0.5s ease-out;
}

/* ── Gradient Text Animation ────────────── */
.text-gradient {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* ── CTA Section Animations ─────────────── */

@keyframes ctaGradientShift {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

@keyframes ctaOrbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-18px) scale(1.04); }
}

@keyframes ctaSquareSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes ctaTextShimmer {
    0%   { background-position: 0%   center; }
    100% { background-position: 200% center; }
}

/* Reduced motion overrides for CTA */
@media (prefers-reduced-motion: reduce) {
    .cta,
    .cta__orb,
    .cta__shape--ring-1,
    .cta__shape--ring-2,
    .cta__shape--square,
    .cta__shape--diamond,
    .cta__eyebrow-dot,
    .cta__title-highlight {
        animation: none !important;
    }

    .cta {
        background: linear-gradient(135deg, #3d1fa3 0%, #6C5CE7 50%, #00D2D3 100%);
    }

    .cta__title-highlight {
        -webkit-text-fill-color: var(--color-white);
    }
}

/* ── Hero Dashboard Bar Animation ────────── */
.hero__dashboard-bar:nth-child(1) { animation-delay: 0.1s; }
.hero__dashboard-bar:nth-child(2) { animation-delay: 0.2s; }
.hero__dashboard-bar:nth-child(3) { animation-delay: 0.3s; }
.hero__dashboard-bar:nth-child(4) { animation-delay: 0.4s; }
.hero__dashboard-bar:nth-child(5) { animation-delay: 0.5s; }
.hero__dashboard-bar:nth-child(6) { animation-delay: 0.6s; }
.hero__dashboard-bar:nth-child(7) { animation-delay: 0.7s; }

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

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero__orb,
    .hero__float,
    .why-us__ring,
    .why-us__floating-card,
    .product-benefits__ring,
    .clients-marquee__track {
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}
