/* ============================================
   PALMARA Landing Page - Animations
   ============================================ */

/* Palm Line Drawing Animation */
.palm-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawLine 2s ease forwards;
}

.palm-line.heart-line { animation-delay: 0.2s; }
.palm-line.head-line { animation-delay: 0.4s; }
.palm-line.life-line { animation-delay: 0.6s; }
.palm-line.fate-line { animation-delay: 0.8s; }
.palm-line.sun-line { animation-delay: 1.0s; }
.palm-line.mercury-line { animation-delay: 1.2s; }

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Palm Outline Animation */
.palm-outline {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawOutline 1.5s ease forwards;
}

@keyframes drawOutline {
    to {
        stroke-dashoffset: 0;
    }
}

/* Scan Beam Animation */
.scan-beam {
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 4px;
    background: linear-gradient(90deg,
        transparent,
        var(--gold-primary),
        var(--gold-light),
        var(--gold-primary),
        transparent);
    border-radius: 2px;
    box-shadow: 0 0 20px var(--gold-primary), 0 0 40px var(--gold-primary);
    animation: scanBeam 3s ease-in-out infinite;
}

@keyframes scanBeam {
    0% { top: 10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 90%; opacity: 0; }
}

/* Fade In Up Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation for Cards */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.visible {
    animation: staggerFadeIn 0.5s ease forwards;
}

.stagger-item:nth-child(1).visible { animation-delay: 0.1s; }
.stagger-item:nth-child(2).visible { animation-delay: 0.2s; }
.stagger-item:nth-child(3).visible { animation-delay: 0.3s; }
.stagger-item:nth-child(4).visible { animation-delay: 0.4s; }
.stagger-item:nth-child(5).visible { animation-delay: 0.5s; }
.stagger-item:nth-child(6).visible { animation-delay: 0.6s; }

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shimmer Effect for Buttons */
.btn-gold {
    position: relative;
    overflow: hidden;
}

.btn-gold::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Float Animation */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Glow Animation */
.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(201, 162, 39, 0.2);
    }
    to {
        box-shadow: 0 0 40px rgba(201, 162, 39, 0.4);
    }
}

/* Text Gradient Animation */
.animated-gradient {
    background: linear-gradient(
        90deg,
        var(--gold-primary),
        var(--gold-light),
        var(--gold-primary)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Rotate Animation */
.rotate {
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Scale In Animation */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Slide In Left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide In Right */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--gold-primary);
    white-space: nowrap;
    animation:
        typing 3s steps(30, end),
        blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--gold-primary); }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(201, 162, 39, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* Line Highlight Animation */
.line-highlight {
    position: relative;
}

.line-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: width 0.3s ease;
}

.line-highlight:hover::after {
    width: 100%;
}

/* Bounce In Animation */
.bounce-in {
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Shake Animation */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Counter Animation */
.counter {
    transition: all 0.3s ease;
}

/* Parallax Scroll Effect (controlled by JS) */
.parallax {
    will-change: transform;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(201, 162, 39, 0.2);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Morphing Shapes */
.morph {
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

/* Orbit Animation */
.orbit {
    animation: orbit 20s linear infinite;
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(100px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(100px) rotate(-360deg);
    }
}

/* Wave Animation */
.wave {
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

