/* ============================================================
   FOMEB — Animations Premium 2026
   ============================================================ */

/* ===== KEYFRAMES ===== */

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

@keyframes fadeInDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

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

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 154, 54, 0.3); }
    50% { box-shadow: 0 0 40px rgba(212, 154, 54, 0.6); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 154, 54, 0.2); }
    50% { box-shadow: 0 0 40px rgba(212, 154, 54, 0.5), 0 0 60px rgba(24, 99, 60, 0.2); }
}

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

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

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

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

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes morphBlob {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
    75% { border-radius: 60% 30% 60% 40% / 60% 40% 30% 70%; }
}

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

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

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--primary, #d49a36); }
}

@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes drawLine {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

@keyframes particleFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -30px) rotate(90deg); }
    50% { transform: translate(-5px, -50px) rotate(180deg); }
    75% { transform: translate(15px, -25px) rotate(270deg); }
}

@keyframes particleFloat2 {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    33% { transform: translate(-15px, -40px); opacity: 0.8; }
    66% { transform: translate(10px, -60px); opacity: 0.5; }
}

@keyframes loaderProgress {
    0% { width: 0%; }
    20% { width: 25%; }
    50% { width: 60%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

@keyframes logoReveal {
    0% { transform: scale(0.5) rotate(-10deg); opacity: 0; filter: blur(10px); }
    60% { transform: scale(1.1) rotate(2deg); opacity: 1; filter: blur(0); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; filter: blur(0); }
}

@keyframes underlineGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

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

/* ===== ANIMATION UTILITY CLASSES ===== */

.animate-fadeInUp { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fadeInDown { animation: fadeInDown 0.8s ease-out forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.8s ease-out forwards; }
.animate-fadeInRight { animation: fadeInRight 0.8s ease-out forwards; }
.animate-scaleIn { animation: scaleIn 0.6s ease-out forwards; }
.animate-bounceIn { animation: bounceIn 0.8s ease-out forwards; }
.animate-slideUp { animation: slideUp 0.6s ease-out forwards; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-floatSlow { animation: floatSlow 8s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-pulseGlow { animation: pulseGlow 2s ease-in-out infinite; }
.animate-glow { animation: glow 3s ease-in-out infinite; }
.animate-rotate { animation: rotate360 20s linear infinite; }
.animate-spinSlow { animation: spinSlow 30s linear infinite; }
.animate-morphBlob { animation: morphBlob 8s ease-in-out infinite; }

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ===== STAGGER DELAYS ===== */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }

/* ===== HOVER EFFECTS ===== */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}
.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow {
    transition: box-shadow 0.4s ease;
}
.hover-glow:hover {
    box-shadow: 0 0 30px rgba(212, 154, 54, 0.4), 0 0 60px rgba(212, 154, 54, 0.1);
}

.hover-scale {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-rotate:hover {
    transform: rotate(5deg) scale(1.02);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}
.hover-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(30deg) translateX(-100%);
    transition: transform 0.8s ease;
}
.hover-shine:hover::after {
    transform: rotate(30deg) translateX(100%);
}

/* ===== TRANSITION UTILITIES ===== */
.transition-smooth {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-fast {
    transition: all 0.2s ease;
}

.transition-slow {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== SCROLL REVEAL (CSS fallback) ===== */
[data-reveal] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal="up"] {
    transform: translateY(50px);
}

[data-reveal="down"] {
    transform: translateY(-50px);
}

[data-reveal="left"] {
    transform: translateX(-50px);
}

[data-reveal="right"] {
    transform: translateX(50px);
}

[data-reveal="scale"] {
    transform: scale(0.85);
}

[data-reveal].revealed {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
}

/* ===== DECORATIVE ELEMENTS ===== */
.blob-decoration {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: morphBlob 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.blob-orange {
    background: var(--primary, #d49a36);
}

.blob-green {
    background: var(--secondary, #18633c);
}

.blob-gold {
    background: var(--accent-gold, #FFB800);
}

.floating-shape {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
}

.floating-shape.circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid var(--primary, #d49a36);
    animation: float 10s ease-in-out infinite;
}

.floating-shape.square {
    width: 100px;
    height: 100px;
    border: 2px solid var(--secondary, #18633c);
    transform: rotate(45deg);
    animation: floatSlow 12s ease-in-out infinite;
}

.floating-shape.triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(255, 184, 0, 0.1);
    animation: float 14s ease-in-out infinite;
}

/* ===== TEXT ANIMATIONS ===== */
.text-gradient-animate {
    background: linear-gradient(135deg, #d49a36, #18633c, #eeb04e, #d49a36);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
}

.text-reveal-line {
    position: relative;
    display: inline-block;
}
.text-reveal-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #d49a36), var(--secondary, #18633c));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.text-reveal-line:hover::after,
.text-reveal-line.active::after {
    transform: scaleX(1);
}

/* ===== LOADING SCREEN ANIMATIONS ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    animation: logoReveal 1.2s ease-out forwards, pulse 2s ease-in-out 1.2s infinite;
    border: 3px solid rgba(212, 154, 54, 0.3);
}

.loader-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin: 25px auto 0;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.8s forwards;
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    animation: loaderProgress 1.8s ease-in-out forwards;
}

/* ===== PAGE TRANSITION ===== */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 99998;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition-overlay.active {
    transform: translateY(0);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator i {
    font-size: 1.2rem;
    animation: fadeInDown 1.5s ease-in-out 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;
    }
    
    .loading-screen {
        display: none;
    }
    
    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
