/* ============================================
   ORÁN SOLUCIONES - ANIMATIONS
   Separado del style.css para mejor mantenibilidad
   ============================================ */

/* ============================================
   EASING CURVES PERSONALIZADAS
   ============================================ */
:root {
    --ease-bounce:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in-expo:   cubic-bezier(0.7, 0, 0.84, 0);
    --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ============================================
   SCROLL REVEAL - Mejorado
   ============================================ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.7s var(--ease-out-expo),
        transform 0.7s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes de dirección */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition:
        opacity 0.7s var(--ease-out-expo),
        transform 0.7s var(--ease-out-expo);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition:
        opacity 0.7s var(--ease-out-expo),
        transform 0.7s var(--ease-out-expo);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Efecto escalonado para grillas - más pronunciado */
.services-grid .service-card:nth-child(1) { transition-delay: 0ms; }
.services-grid .service-card:nth-child(2) { transition-delay: 120ms; }
.services-grid .service-card:nth-child(3) { transition-delay: 240ms; }

.projects-grid .project-card:nth-child(1) { transition-delay: 0ms; }
.projects-grid .project-card:nth-child(2) { transition-delay: 130ms; }
.projects-grid .project-card:nth-child(3) { transition-delay: 260ms; }

.timeline .timeline-item:nth-child(1) { transition-delay: 0ms; }
.timeline .timeline-item:nth-child(2) { transition-delay: 150ms; }
.timeline .timeline-item:nth-child(3) { transition-delay: 300ms; }
.timeline .timeline-item:nth-child(4) { transition-delay: 450ms; }

/* ============================================
   PROJECT CARD - Overlay hover mejorado
   ============================================ */
.project-image-container {
    position: relative;
}

.project-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(11, 22, 41, 0.85) 0%,
        rgba(27, 228, 242, 0.15) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition:
        opacity 0.4s var(--ease-smooth),
        backdrop-filter 0.4s var(--ease-smooth);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 2;
}

.project-card:hover .project-image-overlay {
    opacity: 1;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.project-image-overlay-text {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border: 1.5px solid rgba(27, 228, 242, 0.7);
    border-radius: 9999px;
    background: rgba(27, 228, 242, 0.1);
    backdrop-filter: blur(8px);
    transform: translateY(10px) scale(0.95);
    transition:
        transform 0.4s var(--ease-bounce),
        box-shadow 0.4s var(--ease-smooth);
    box-shadow: 0 0 0 rgba(27, 228, 242, 0.3);
}

.project-card:hover .project-image-overlay-text {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 20px rgba(27, 228, 242, 0.3);
}

/* Imagen con escala más suave */
.project-image-container img {
    transition: transform 0.6s var(--ease-out-expo) !important;
}
.project-card:hover .project-image-container img {
    transform: scale(1.08) !important;
}

/* ============================================
   SERVICE CARD - Micro-animaciones mejoradas
   ============================================ */
.service-card {
    transition:
        transform 0.4s var(--ease-bounce),
        box-shadow 0.4s var(--ease-smooth),
        border-color 0.4s var(--ease-smooth) !important;
}

.service-card:hover {
    transform: translateY(-10px) !important;
}

.service-icon {
    transition:
        transform 0.4s var(--ease-bounce),
        box-shadow 0.4s var(--ease-smooth),
        background-color 0.4s var(--ease-smooth);
}

.service-card:hover .service-icon {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 0 0 25px rgba(27, 228, 242, 0.35);
    background-color: rgba(27, 228, 242, 0.18);
}

/* ============================================
   TIMELINE - Animacion del ícono
   ============================================ */
.timeline-icon {
    transition:
        transform 0.4s var(--ease-bounce),
        box-shadow 0.4s var(--ease-smooth) !important;
}

.timeline-item:hover .timeline-icon {
    transform: translate(-50%, -50%) scale(1.15) !important;
    box-shadow: 0 0 30px rgba(27, 228, 242, 0.6) !important;
}

/* ============================================
   NAVBAR - Active link indicator
   ============================================ */
.nav-links a {
    transition:
        color 0.3s var(--ease-smooth),
        transform 0.3s var(--ease-bounce) !important;
}

.nav-links a:hover {
    transform: translateY(-3px) !important;
}

.nav-links a::after {
    transition: width 0.35s var(--ease-out-expo) !important;
}

/* ============================================
   HERO - Animación de entrada escalonada
   ============================================ */
@keyframes hero-fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-headline {
    animation: hero-fade-up 0.8s var(--ease-out-expo) 0.1s both;
}

.hero-subheadline {
    animation: hero-fade-up 0.8s var(--ease-out-expo) 0.25s both;
}

.hero-buttons {
    animation: hero-fade-up 0.8s var(--ease-out-expo) 0.4s both;
}

.hero-visual-container {
    animation: hero-fade-up 0.9s var(--ease-out-expo) 0.3s both;
}

/* ============================================
   FLOAT - Más suave
   ============================================ */
.mockup-container {
    animation: float-smooth 7s var(--ease-in-out-quart) infinite !important;
}

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

/* ============================================
   GLOW PULSE en botón primario
   ============================================ */
.btn-primary {
    transition:
        transform 0.3s var(--ease-bounce),
        box-shadow 0.3s var(--ease-smooth) !important;
}

.btn-primary:hover {
    transform: scale(1.06) translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(27, 228, 242, 0.5) !important;
}

/* ============================================
   INFO ITEMS - Contacto
   ============================================ */
.info-item {
    transition:
        border-color 0.35s var(--ease-smooth),
        transform 0.35s var(--ease-bounce),
        box-shadow 0.35s var(--ease-smooth) !important;
}

.info-item:hover {
    transform: translateX(6px) !important;
    box-shadow: -4px 0 20px rgba(27, 228, 242, 0.15);
}

/* ============================================
   SOCIAL ICONS
   ============================================ */
.social-icons a {
    transition:
        color 0.3s var(--ease-smooth),
        transform 0.35s var(--ease-bounce) !important;
}

.social-icons a:hover {
    transform: translateY(-5px) scale(1.15) !important;
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-headline,
    .hero-subheadline,
    .hero-buttons,
    .hero-visual-container {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .mockup-container {
        animation: none !important;
    }

    .project-image-overlay-text {
        transform: none !important;
    }
}
