<!DOCTYPE html>
<!--[if IE 8]>
<html class="no-js lt-ie9" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
    <title>Page not found</title>
    <meta charset="utf-8"/>
    <!-- Set the viewport width to device width for mobile -->
    <meta name="viewport" content="width=device-width"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">

    <style type="text/css">
        html {
            font-family: sans-serif;
            text-size-adjust: 100%;
        }

        article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
            display: block;
        }

        audio, canvas, progress, video {
            display: inline-block;
            vertical-align: baseline;
        }

        a {
            background: 0px 0px;
        }

        a:active, a:hover {
            outline: 0px;
        }

        *, ::after, ::before {
            box-sizing: border-box;
        }

        body, html {
            font-size: 100%;
        }

        body {
            padding: 0px;
            margin: 0px;
            font-family: colfax-web, Helvetica-Neue, Helvetica, Arial, sans-serif;
            font-weight: 400;
            font-style: normal;
            line-height: 150%;
            position: relative;
            cursor: default;
        }

        img {
            max-width: 100%;
            height: auto;
        }

        img {
            display: inline-block;
            vertical-align: middle;
        }

        textarea {
            height: auto;
            min-height: 50px;
        }

        select {
            width: 100%;
        }

        dialog[open] {
            display: block;
            visibility: visible;
        }

        blockquote, dd, div, dl, dt, form, h1, h2, h3, h4, h5, h6, li, ol, p, pre, td, th, ul {
            margin: 0px;
            padding: 0px;
        }

        a {
            text-decoration: none;
            line-height: inherit;
        }

        p {
            font-family: inherit;
            font-weight: 400;
            font-size: 1.125rem;
            line-height: 1.5;
            margin-bottom: 1.25rem;
        }

        p aside {
            font-size: 0.875rem;
            line-height: 1.35;
            font-style: italic;
        }

        h1, h2, h3, h4, h5, h6 {
            font-weight: 800;
            font-style: normal;
            color: rgb(40, 38, 39);
            text-rendering: optimizeLegibility;
            line-height: 1.1;
        }

        a {
            transition: all 0.25s ease-out;
        }

        a, blockquote, h1, h2, h3, h4, h5, h6, li, p, span {
            text-rendering: optimizeLegibility;
            -webkit-font-smoothing: antialiased;
        }

        body {
            animation: bugfix 1s infinite;
        }

        body, html {
            height: 100%;
            color: rgb(100, 100, 100);
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: colfax-web, Helvetica-Neue, Helvetica, Arial, sans-serif;
            margin: 2.5rem 0px 0.625rem;
        }

        h3 {
            font-weight: 600;
        }

        h4 {
            font-weight: 400;
        }

        h5 {
            font-weight: 400;
            text-transform: uppercase;
        }

        h6 {
            font-weight: 400;
        }

        a {
            color: rgb(88, 166, 162);
        }

        a:hover {
            color: rgb(156, 200, 197);
        }

        [class*=" icon-"]::before, [class^="icon-"]::before {
            font-family: iconfont;
            display: inline-block;
            vertical-align: middle;
            line-height: 1;
            font-weight: 400;
            font-style: normal;
            speak: none;
            text-decoration: inherit;
            text-transform: none;
            text-rendering: optimizeLegibility;
            -webkit-font-smoothing: antialiased;
        }

        body, html {
            background: rgb(40, 38, 39);
        }

        .msg {
            position: absolute;
            top: 50%;
            left: 50%;
            z-index: 2;
            transform: translateX(-50%) translateY(-50%);
            text-align: center;
        }

        .msg .PageBrand {
            height: 100px;
        }

        .msg h2, .msg p {
            color: rgb(255, 255, 255);
        }

        canvas {
            position: absolute;
            top: 0px;
            left: 0px;
            bottom: 0px;
            right: 0px;
            z-index: 1;
        }

        body, * {
            font-family: Lato, sans-serif !important;
        }

        h2 {
            font-size: 2.25rem;
        }
    </style>
    <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.2/modernizr.min.js"></script>

    <style type="text/css">
        body, * {
            font-family: 'Lato', sans-serif !important;
        }
    </style>

    {% block head %}{% endblock %}
</head>
<body>
<div class="msg">
    {% block body %}
        <h2>Sin contenido</h2>
    {% endblock %}
</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r70/three.min.js"></script>
<script>
    var mouseX = 0, mouseY = 0;
    var scene = new THREE.Scene();
    var camera = new THREE.PerspectiveCamera(40, window.innerWidth / window.innerHeight, 0.1, 1000);
    var innerColor = 0x777777,
        outerColor = 0x666666;
    var innerSize = 40,
        outerSize = 70;

    var renderer = new THREE.WebGLRenderer();
    renderer.setClearColor(0x282627, 0); // background

    renderer.setSize(window.innerWidth, window.innerHeight);
    document.body.appendChild(renderer.domElement);


    // Mesh
    var group = new THREE.Group();
    scene.add(group);

    // Lights
    var light = new THREE.AmbientLight(0x404040); // soft white light
    scene.add(light);

    var directionalLight = new THREE.DirectionalLight(0xffffff, 1);
    directionalLight.position.set(0, 128, 128);
    scene.add(directionalLight);

    // Sphere Wireframe Inner
    var sphereWireframeInner = new THREE.Mesh(
        new THREE.DodecahedronGeometry(innerSize, 1),
        new THREE.MeshLambertMaterial({
            color: innerColor,
            ambient: innerColor,
            wireframe: true,
            transparent: false,
            shininess: 0
        })
    );
    //scene.add(sphereWireframeInner);

    // Sphere Wireframe Outer
    var sphereWireframeOuter = new THREE.Mesh(
        new THREE.DodecahedronGeometry(outerSize, 1),
        new THREE.MeshLambertMaterial({
            color: outerColor,
            ambient: outerColor,
            wireframe: true,
            transparent: true,
            shininess: 0
        })
    );
    //    scene.add(sphereWireframeOuter);


    // Sphere Glass Inner
    var sphereGlassInner = new THREE.Mesh(
        new THREE.SphereGeometry(innerSize, 32, 32),
        new THREE.MeshPhongMaterial({
            color: innerColor,
            ambient: innerColor,
            transparent: true,
            shininess: 5,
            opacity: 0.05,
        })
    );
    //    scene.add(sphereGlassInner);

    // Sphere Glass Outer
    var sphereGlassOuter = new THREE.Mesh(
        new THREE.SphereGeometry(outerSize, 32, 32),
        new THREE.MeshPhongMaterial({
            color: outerColor,
            ambient: outerColor,
            transparent: true,
            shininess: 5,
            opacity: 0,
        })
    );
    //    scene.add(sphereGlassOuter);

    // Particles Outer
    var geometry = new THREE.Geometry();

    for(i = 0; i < 10; i++) {

        var x = -1 + Math.random() * 2;
        var y = -1 + Math.random() * 2;
        var z = -1 + Math.random() * 2;
        var d = 1 / Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2));
        x *= d;
        y *= d;
        z *= d;

        var vertex = new THREE.Vector3(
            x * outerSize,
            y * outerSize,
            z * outerSize
        );

        geometry.vertices.push(vertex);

    }


    var particlesOuter = new THREE.PointCloud(geometry, new THREE.PointCloudMaterial({
            size: 0.9,
            color: outerColor,
            //map: THREE.ImageUtils.loadTexture( 'javascripts/particletextureshaded.png' ),
            transparent: true,
        })
    );
    scene.add(particlesOuter);

    // Particles Inner
    var geometry = new THREE.Geometry();
    for(i = 0; i < 10; i++) {

        var x = -1 + Math.random() * 2;
        var y = -1 + Math.random() * 2;
        var z = -1 + Math.random() * 2;
        var d = 1 / Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2));
        x *= d;
        y *= d;
        z *= d;

        var vertex = new THREE.Vector3(
            x * outerSize,
            y * outerSize,
            z * outerSize
        );

        geometry.vertices.push(vertex);

    }


    var particlesInner = new THREE.PointCloud(geometry, new THREE.PointCloudMaterial({
            size: 0.9,
            color: innerColor,
            //map: THREE.ImageUtils.loadTexture( 'javascripts/particletextureshaded.png' ),
            transparent: false,
        })
    );
    scene.add(particlesInner);

    // Starfield
    var geometry = new THREE.Geometry();
    for(i = 0; i < 5000; i++) {
        var vertex = new THREE.Vector3();
        vertex.x = Math.random() * 2000 - 1000;
        vertex.y = Math.random() * 2000 - 1000;
        vertex.z = Math.random() * 2000 - 1000;
        geometry.vertices.push(vertex);
    }
    var starField = new THREE.PointCloud(geometry, new THREE.PointCloudMaterial({
            size: 3,
            color: 0x666666
        })
    );
    scene.add(starField);


    camera.position.z = -110;
    camera.position.x = mouseX * 0.05;
    camera.position.y = -mouseY * 0.05;
    camera.lookAt(scene.position);

    var time = new THREE.Clock();

    var render = function() {
        camera.position.x = mouseX * 0.05;
        camera.position.y = -mouseY * 0.05;
        camera.lookAt(scene.position);

        sphereWireframeInner.rotation.x += 0.002;
        sphereWireframeInner.rotation.z += 0.002;

        sphereWireframeOuter.rotation.x += 0.001;
        sphereWireframeOuter.rotation.z += 0.001;

        sphereGlassInner.rotation.y += 0.001;
        sphereGlassInner.rotation.z += 0.001;

        sphereGlassOuter.rotation.y += 0.0005;
        sphereGlassOuter.rotation.z += 0.0005;

        particlesOuter.rotation.y += 0.0005;
        particlesInner.rotation.y -= 0.002;

        starField.rotation.y -= 0.0005;

        var innerShift = Math.abs(Math.cos(( (time.getElapsedTime() + 2.5) / 20)));
        var outerShift = Math.abs(Math.cos(( (time.getElapsedTime() + 5) / 10)));

        //starField.material.color.setHSL(Math.abs(Math.cos((time.getElapsedTime() / 10))), 1, 0.5);

        //sphereWireframeOuter.material.color.setHSL(0, 1, outerShift);
        //sphereGlassOuter.material.color.setHSL(0, 1, outerShift);
        //particlesOuter.material.color.setHSL(0, 1, outerShift);

        //sphereWireframeInner.material.color.setHSL(0.08, 1, innerShift);
        //particlesInner.material.color.setHSL(0.08, 1, innerShift);
        //sphereGlassInner.material.color.setHSL(0.08, 1, innerShift);

        sphereWireframeInner.material.opacity = Math.abs(Math.cos((time.getElapsedTime() + 0.5) / 0.9) * 0.8);
        sphereWireframeOuter.material.opacity = Math.abs(Math.cos(time.getElapsedTime() / 0.9) * 0.8);


        directionalLight.position.x = Math.cos(time.getElapsedTime() / 0.75) * 128;
        directionalLight.position.y = Math.cos(time.getElapsedTime() / 0.75) * 128;
        directionalLight.position.z = Math.sin(time.getElapsedTime() / 0.75) * 128;

        renderer.render(scene, camera);
        requestAnimationFrame(render);
    };


    // Mouse and resize events
    document.addEventListener('mousemove', onDocumentMouseMove, false);
    window.addEventListener('resize', onWindowResize, false);

    function onWindowResize() {
        camera.aspect = window.innerWidth / window.innerHeight;
        camera.updateProjectionMatrix();
        renderer.setSize(window.innerWidth, window.innerHeight);
    }

    function onDocumentMouseMove(event) {
        mouseX = event.clientX - window.innerWidth / 2;
        mouseY = event.clientY - window.innerHeight / 2;
    }

    render();
</script>

</body>
</html>