/* ============================================================
   SOFTEKUS — Animations & Scroll Reveal Styles
   ============================================================ */

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

/* Base state: invisible & offset */
.reveal-up,
.reveal-down,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    transition: opacity var(--duration-slower) var(--ease-out),
                transform var(--duration-slower) var(--ease-out);
    will-change: opacity, transform;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-down {
    transform: translateY(-40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-scale {
    transform: scale(0.92);
}

/* Revealed state */
.reveal-up.revealed,
.reveal-down.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Staggered delays for groups */
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }

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

/* Title lines staggered entry */
.hero__title .hero__title-line:nth-child(1) { animation: heroFadeUp 0.8s var(--ease-out) 0.3s both; }
.hero__title .hero__title-line:nth-child(2) { animation: heroFadeUp 0.8s var(--ease-out) 0.5s both; }
.hero__title .hero__title-line:nth-child(3) { animation: heroFadeUp 0.8s var(--ease-out) 0.7s both; }

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

/* Hero badge */
.hero__badge {
    animation: fadeIn 0.6s var(--ease-out) 0.1s both;
}

/* Hero description */
.hero__description {
    animation: fadeIn 0.8s var(--ease-out) 0.9s both;
}

/* Hero actions */
.hero__actions {
    animation: fadeIn 0.8s var(--ease-out) 1.1s both;
}

/* Hero stats */
.hero__stats {
    animation: fadeIn 0.8s var(--ease-out) 1.3s both;
}

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

/* Text rotation animation */
.text-rotate {
    display: inline-block;
    animation: textRotateIn 0.6s var(--ease-out) forwards;
}

.text-rotate.fade-out {
    animation: textRotateOut 0.3s var(--ease-out) forwards;
}

@keyframes textRotateIn {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(-10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@keyframes textRotateOut {
    from {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) rotateX(10deg);
    }
}

/* ============================================================
   COUNTER ANIMATION
   ============================================================ */
.hero__stat-number {
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   PULSE ANIMATIONS
   ============================================================ */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes pulseRing {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* ============================================================
   GRADIENT ANIMATION
   ============================================================ */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.text-gradient {
    background-size: 200% auto;
    animation: gradientShift 4s ease-in-out infinite;
}

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

/* Link underline animation */
.animated-link {
    position: relative;
}

.animated-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--duration-normal) var(--ease-out);
}

.animated-link:hover::after {
    width: 100%;
}

/* Card shine effect */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transition: left 0.6s var(--ease-out);
    pointer-events: none;
    z-index: 0;
}

.service-card:hover::after {
    left: 100%;
}

/* ============================================================
   LOADING DOTS
   ============================================================ */
@keyframes loadingDots {
    0%, 20% { opacity: 0; }
    40% { opacity: 1; }
    60%, 100% { opacity: 0; }
}

.loading-dots span:nth-child(1) { animation: loadingDots 1.4s infinite 0s; }
.loading-dots span:nth-child(2) { animation: loadingDots 1.4s infinite 0.2s; }
.loading-dots span:nth-child(3) { animation: loadingDots 1.4s infinite 0.4s; }

/* ============================================================
   MARQUEE (for tech logos if needed)
   ============================================================ */
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee {
    animation: marquee 30s linear infinite;
}

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

    .reveal-up,
    .reveal-down,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }

    .hero__gradient-orb {
        animation: none;
    }

    .about__floating-card {
        animation: none;
    }
}
