/* =====================================================
   OPA Energy 2.0 — Motion System
   ===================================================== */

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

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

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

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

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Hero line-mask reveal --- */
@keyframes lineUp {
    from { transform: translateY(115%) rotate(3deg); }
    to { transform: translateY(0) rotate(0); }
}

.hero .hero-line > span {
    display: inline-block;
    transform: translateY(115%) rotate(3deg);
    will-change: transform;
}

.hero-loaded .hero-line:nth-child(1) > span { animation: lineUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards; }
.hero-loaded .hero-line:nth-child(2) > span { animation: lineUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards; }
.hero-loaded .hero-line:nth-child(3) > span { animation: lineUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards; }

.hero .hero-top,
.hero .hero-bottom,
.hero .hero-ticker { opacity: 0; }

.hero-loaded .hero-top    { animation: fadeInUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.1s forwards; }
.hero-loaded .hero-bottom { animation: fadeInUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.75s forwards; }
.hero-loaded .hero-ticker { animation: fadeInUp 0.9s ease 1s forwards; }

/* --- Marquee / ticker --- */
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.ticker-track,
.marquee-row {
    animation: marquee 30s linear infinite;
}

.marquee-row.reverse {
    animation-direction: reverse;
}

.hero-ticker:hover .ticker-track,
.partners-marquee:hover .marquee-row {
    animation-play-state: paused;
}

/* --- Glow orbs --- */
@keyframes glowDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -40px) scale(1.15); }
    66% { transform: translate(-40px, 30px) scale(0.95); }
}

.hero-glow--a { animation: glowDrift 14s ease-in-out infinite; }
.hero-glow--b { animation: glowDrift 18s ease-in-out infinite reverse; }

/* --- Pulse dot --- */
@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(255, 77, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0); }
}

.pulse-dot {
    animation: pulseDot 2s ease-out infinite;
}

/* --- Scroll indicator --- */
@keyframes scrollChevron {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.4; }
}

.scroll-indicator .chevron {
    animation: scrollChevron 1.6s ease-in-out infinite;
}

/* --- Loading screen --- */
@keyframes dropFall {
    0% { transform: translateY(-10px) scale(1); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(24px) scale(0.6); opacity: 0; }
}

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

@keyframes logoBreathe {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.04); filter: brightness(1.15); }
}

.loading-logo { animation: logoBreathe 2s ease-in-out infinite; }
.loading-drop:nth-child(1) { animation: dropFall 1.2s ease-in infinite; }
.loading-drop:nth-child(2) { animation: dropFall 1.2s ease-in 0.25s infinite; }
.loading-drop:nth-child(3) { animation: dropFall 1.2s ease-in 0.5s infinite; }
.loading-bar-fill { animation: barFill 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* --- Reveal staggers --- */
.stagger-1 { transition-delay: 0.08s !important; }
.stagger-2 { transition-delay: 0.16s !important; }
.stagger-3 { transition-delay: 0.24s !important; }
.stagger-4 { transition-delay: 0.32s !important; }
.stagger-5 { transition-delay: 0.4s !important; }
.stagger-6 { transition-delay: 0.48s !important; }
.stagger-7 { transition-delay: 0.56s !important; }
.stagger-8 { transition-delay: 0.64s !important; }
.stagger-9 { transition-delay: 0.72s !important; }

/* --- Card tilt --- */
.service-card { perspective: 1000px; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero .hero-line > span { transform: none; }
    .hero .hero-top, .hero .hero-bottom, .hero .hero-ticker { opacity: 1; }
    .reveal, .reveal-left, .reveal-right { opacity: 1 !important; transform: none !important; }
}
