@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0px);
    }
}

.animate-fade-in {
    animation: fade-in 1.1s ease-out;
}

:root {
    --carousel-speed: 20s;
    --carousel-gap: 2rem;
    /* Reducido un poco para móviles */
    --logo-width: 5rem;
    /* Reducido para móviles */
}

@media (min-width: 768px) {
    :root {
        --carousel-gap: 3rem;
        --logo-width: 6rem;
    }
}

.carousel {
    position: relative;
    display: flex;
    overflow: hidden;
    max-width: 1000px;
    margin-inline: auto;
    /* Máscara suave para los lados */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logos {
    display: flex;
    align-items: center;
    column-gap: var(--carousel-gap);
    flex-shrink: 0;
    min-width: 100%;
    animation: scroll var(--carousel-speed) linear infinite;
    padding-right: var(--carousel-gap);
}


.logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.carousel:hover .logos {
    animation-play-state: paused;
}


/* OLA SVG */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.wave-divider .shape-fill {
    fill: var(--bg-section-wave);
    /* Sutil en modo dark */
}


/* RADAR TECNOLÓGICO MEJORADO */
.radar-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.dark .radar-card {
    background: rgba(255, 255, 255, 0.03);
}

.radar-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-primary);
    box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.2);
}

/* CRONOLOGÍA DE INGENIERÍA */
.step-number {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.step-card {
    position: relative;
    flex: 1;
}

.step-number {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.timeline-connector {
    position: absolute;
    top: 2rem;
    /* Centrado en los círculos de 4rem */
    left: 0;
    width: 100%;
    height: 2px;

    background: var(--color-1);
    opacity: 0.3;
    z-index: 0;
}

.project-card-static {
    transition: all 0.3s ease;
}

.project-card-static:hover {
    transform: translateY(-5px);
    border-color: red;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.project-image-container {
    overflow: hidden;
    position: relative;
}

.project-image-container img {
    transition: transform 0.5s ease;
}

.project-card-static:hover .project-image-container img {
    transform: scale(1.05);
}

.project-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card-static:hover .project-overlay {
    opacity: 1;
}

/* Chips de tecnologías */
.tech-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-primary);
    border: 1px solid rgba(37, 99, 235, 0.15);
    text-transform: uppercase;
}

.dark .tech-chip {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.2);
}

.step-card {
    position: relative;
    flex: 1;
}

.step-number {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.timeline-connector {
    position: absolute;
    top: 2rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color-1) 20%, var(--border-color-1) 80%, transparent);
    z-index: 0;
}



/** ORBITA */

#orbit-container {
    perspective: 1200px;
    /* Fondo claro con degradado suave */
    /* background:
            radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);*/
    overflow: hidden;
    cursor: grab;
}

#orbit-container:active {
    cursor: grabbing;
}

.tech-card {
    position: absolute;
    transform-style: preserve-3d;
    transition: opacity 0.3s ease;
    user-select: none;
}

/* Retícula Polar de Fondo (Modo Claro) */
.polar-grid-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(75deg);
    pointer-events: none;
}

.polar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    /* Líneas oscuras suaves */
    border-radius: 50%;
}

.polar-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160%;
    height: 1px;
    background: rgba(15, 23, 42, 0.05);
    transform-origin: center;
}

/* Tarjetas Estilo Glassmorphism Claro */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    opacity: 0;
    animation: pageLoad 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes pageLoad {
    to {
        opacity: 1;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
    animation-delay: 0.3s;

}

@keyframes rotar {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.animate-rotar {
    animation: rotar 20s linear infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}