/* ============================================
   THE OLD ALMA — Animations & Scroll Reveals
   ============================================ */

/* ---- Reveal Animations ---- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.3s; }

/* ---- Shimmer on gold elements ---- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer-text {
    background: linear-gradient(
        90deg,
        var(--color-accent) 0%,
        #e8d5a0 25%,
        var(--color-accent) 50%,
        #e8d5a0 75%,
        var(--color-accent) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* ---- Pulse glow on accent elements ---- */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.3);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(201, 169, 110, 0.1);
    }
}

.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* ---- Fade in scale ---- */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Parallax float ---- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* ---- Gentle rotate ---- */
@keyframes gentleRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---- Image reveal with clip ---- */
@keyframes imageReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.image-reveal {
    animation: imageReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ---- Underline draw ---- */
@keyframes drawLine {
    from { width: 0; }
    to { width: 60px; }
}

/* ---- Smooth counter animation ---- */
.counter-animated {
    display: inline-block;
}

/* ---- Focus styles for accessibility ---- */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* ---- 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-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }

    .hero-slide-bg {
        animation: none;
        transform: none;
    }

    .scroll-line::after {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}
