/**
 * Starter Animations for Elementor
 * Styles for animations
 */

/* Base styles for animated elements */
.starter-animation {
    will-change: transform, opacity;
}

/* Cursor blink animation for typewriter */
@keyframes starterBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.starter-cursor {
    display: inline-block;
    margin-left: 2px;
    font-weight: 100;
    animation: starterBlink 0.7s infinite;
}

/* Split text elements */
.starter-char,
.starter-word,
.starter-line {
    display: inline-block;
    will-change: transform, opacity;
}

/* Reveal wrapper */
.starter-reveal-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.starter-reveal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Performance optimizations */
.starter-animation[data-starter-animation*="parallax"] {
    will-change: transform;
    backface-visibility: hidden;
}

/* Prevent FOUC (Flash of Unstyled Content) */
.starter-animation:not(.gsap-initialized) {
    visibility: visible;
}

/* ScrollTrigger markers custom styling */
.gsap-marker-start,
.gsap-marker-end,
.gsap-marker-scroller-start,
.gsap-marker-scroller-end {
    font-size: 12px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .starter-animation,
    .starter-animation * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Glitch effect helper styles */
.starter-glitch-active {
    position: relative;
}

/* 3D transform support */
.starter-animation[data-starter-animation*="flip"] {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Smooth scroll for pinned elements */
.starter-animation[data-starter-animation*="pin"] {
    position: relative;
    z-index: 1;
}

/* Fix for Elementor containers */
.elementor-element.starter-animation {
    transform-origin: center center;
}

/* Ensure visibility during editor preview */
.elementor-editor-active .starter-animation {
    visibility: visible !important;
    opacity: 1 !important;
}
