.elementor-82772 .elementor-element.elementor-element-1d04c72{--display:flex;}.elementor-82772 .elementor-element.elementor-element-cc5a92d{width:100%;max-width:100%;}.elementor-82772 .elementor-element.elementor-element-328f173{width:100%;max-width:100%;}.elementor-82772 .elementor-element.elementor-element-646b0db{width:100%;max-width:100%;}/* Start custom CSS */<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cartografía del After</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Uncial+Antiqua&family=Bodoni+Moda:opsz,wght@6..96,400;6..96,900&family=Playfair+Display:700&display=swap" rel="stylesheet">
    <!-- GSAP Libraries (Removed premium plugins) -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollToPlugin.min.js"></script>
    <style>
        body {
            background-color: #111111;
            color: #EAEAEA;
            font-family: 'Bodoni Moda', serif;
            overflow-x: hidden;
        }
        .animation-container {
            min-height: 100vh; /* Make each section fill the viewport */
            padding: 4rem 0; /* Adjusted for full width */
            border-bottom: 1px solid #444;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            position: relative; /* For absolute positioning of elements */
            overflow: hidden; /* Hide overflowing animations */
        }
        .animation-title {
            font-family: 'Uncial Antiqua', cursive;
            color: #FACC15; /* yellow-400 */
            font-size: 1.5rem;
            margin-bottom: 1rem;
            text-transform: uppercase;
            position: absolute; /* Position relative to container */
            top: 2rem;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            background-color: rgba(17, 17, 17, 0.8); /* Semi-transparent background */
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
        }
        .target-text {
            font-family: 'Playfair Display', serif; /* Changed for more impact */
            font-size: clamp(2rem, 8vw, 4.5rem);
            font-weight: 900;
            line-height: 1.1;
            /* max-width: 900px; Removed for full width */
            width: 100%; /* Ensure it takes full available width */
            padding: 0 1rem; /* Add a small internal padding to prevent text from touching edges */
            box-sizing: border-box; /* Include padding in width calculation */
            position: relative; /* For animations */
            z-index: 5;
        }
        .target-text-small {
            font-family: 'Bodoni Moda', serif;
            font-size: clamp(1.2rem, 4vw, 1.8rem);
            /* max-width: 800px; Removed for full width */
            width: 100%; /* Ensure it takes full available width */
            padding: 0 1rem; /* Add a small internal padding to prevent text from touching edges */
            box-sizing: border-box; /* Include padding in width calculation */
            line-height: 1.4;
            color: #D1D5DB; /* gray-300 */
            position: relative; /* For animations */
            z-index: 5;
        }
        /* Class for individual characters/words (SplitText creates these) - Not used anymore but kept for reference */
        .char, .word {
            display: inline-block;
            will-change: transform, opacity, filter; /* Optimize for animations */
        }
        .header {
             background-image: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(17,17,17,1)), url('https://salamicasa.es/wp-content/uploads/2025/07/completo60-0617-scaled.jpg');
             background-size: cover;
             background-position: center;
             background-attachment: fixed; /* Keep background fixed for parallax */
             position: relative;
             overflow: hidden;
        }
        /* Specific styles for the header background image to allow more dramatic parallax */
        .header::before {
            content: '';
            position: absolute;
            top: -50%; /* Start higher for more reveal */
            left: 0;
            width: 100%;
            height: 200%; /* Make it taller than the container */
            background: url('https://salamicasa.es/wp-content/uploads/2025/07/completo60-0617-scaled.jpg') center top / cover no-repeat;
            filter: brightness(0.5) contrast(1.2); /* Initial filter for dramatic look */
            z-index: 1;
            will-change: transform, filter;
        }
        .header .target-text, .header .target-text-small {
            z-index: 2; /* Ensure text is above pseudo-element */
        }

        /* Specific styles for explosive words */
        .explosive-word-container {
            display: inline-block;
            cursor: pointer;
            position: relative;
            z-index: 5;
        }
        .explosive-word-container .char {
            transition: transform 0.3s ease-out, opacity 0.3s ease-out;
        }
    </style>
</head>
<body>

    <div class="animation-container header">
        <h1 id="main-title" class="target-text font-['Uncial_Antiqua']">Cartografía del After</h1>
        <p class="target-text-small mt-4">El único libro Libro con BSO</p>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Aparición caótica</h2>
        <h1 id="text1" class="target-text">WELCOME AL PRIMER ABORTO TEOLÓGICO-CÓSMICO</h1>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Máquina de escribir post-apocalíptica</h2>
        <p id="text2" class="target-text-small">Nuestros hígados intercambian recetas de cócteles durante trasplantes alcohólicos</p>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Palabras que caen al hacer scroll</h2>
        <h1 id="text3" class="target-text">El telón se abre con un reloj digital contando hacia atrás.</h1>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Versos ebrios</h2>
        <p id="text4" class="target-text-small">Nuestros hígados intercambian recetas de cócteles durante trasplantes alcohólicos</p>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Torero tridimensional</h2>
        <h1 id="text5" class="target-text">Torero Tentacular</h1>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Mensaje en morse</h2>
        <p id="text6" class="target-text-small">perros callejeros que ladran salmos en morse</p>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Revelación por color</h2>
        <h1 id="text7" class="target-text">Hoy resucitamos a Nietzsche para que se coma su propio bigote en directo</h1>
    </div>
    
    <div class="animation-container">
        <h2 class="animation-title">Palabras explosivas (pasa el ratón)</h2>
        <h1 id="text8" class="target-text">APOCALÍPTICO</h1>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Florecer desde el desenfoque</h2>
        <p id="text9" class="target-text-small">de su corazón florecen buganvillas que atraen mariposas venenosas</p>
    </div>

    <div class="animation-container">
        <h2 class="animation-title">Glitch en la Realidad</h2>
        <h1 id="text10" class="target-text">Click click click, no bullets left.</h1>
    </div>

    <script>
        // Register GSAP plugins (removed premium ones)
        gsap.registerPlugin(ScrollTrigger, ScrollToPlugin);

        // --- Header Parallax (Main Image) ---
        gsap.to(".header::before", {
            scrollTrigger: {
                trigger: ".header",
                start: "top top",
                end: "bottom top",
                scrub: true,
            },
            y: "50%", // Moves the background down relative to its container
            filter: "brightness(1) contrast(1)", // Removes initial filters
            ease: "none"
        });

        // --- Chaotic Appearance (#text1) ---
        gsap.from("#text1", {
            scrollTrigger: {
                trigger: "#text1",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            opacity: 0,
            x: () => gsap.utils.random(-200, 200),
            y: () => gsap.utils.random(-200, 200),
            rotation: () => gsap.utils.random(-360, 360),
            scale: 0.1,
            duration: 1.5,
            ease: "power4.out"
        });

        // --- Post-Apocalyptic Typewriter (#text2) ---
        // TextPlugin is premium, so we'll just fade in the text
        gsap.from("#text2", {
            scrollTrigger: {
                trigger: "#text2",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            opacity: 0,
            duration: 1.5,
            ease: "power2.out"
        });

        // --- Falling Words (#text3) ---
        gsap.from("#text3", {
            scrollTrigger: {
                trigger: "#text3",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            y: -200,
            opacity: 0,
            rotationX: 90,
            scale: 0.5,
            duration: 1,
            ease: "bounce.out"
        });

        // --- Drunken Verses (#text4) ---
        // Original effect relied on SplitText, simplifying to a general wobble on the whole element
        gsap.from("#text4", {
            scrollTrigger: {
                trigger: "#text4",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            y: () => gsap.utils.random(-10, 10),
            x: () => gsap.utils.random(-5, 5),
            rotationZ: () => gsap.utils.random(-5, 5),
            opacity: 0,
            duration: 0.8,
            ease: "power2.out"
        });

        // --- Three-Dimensional Bullfighter (#text5) ---
        // Original effect relied on SplitText for 3D chars, simplifying to a general scale/rotation
        gsap.from("#text5", {
            scrollTrigger: {
                trigger: "#text5",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            opacity: 0,
            scale: 0.5,
            rotationY: 180,
            duration: 1.5,
            ease: "power3.out"
        });

        // --- Morse Code Message (#text6) ---
        // Original effect relied on SplitText for char-by-char flicker
        gsap.from("#text6", {
            scrollTrigger: {
                trigger: "#text6",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            opacity: 0,
            repeat: -1,
            yoyo: true,
            duration: 0.1, // Rapid blink
            ease: "steps(1)"
        });

        // --- Color Revelation (#text7) ---
        // Original effect relied on SplitText for char-by-char color change
        gsap.from("#text7", {
            scrollTrigger: {
                trigger: "#text7",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            opacity: 0,
            filter: "hue-rotate(0deg)", // Start with no hue rotation
            onStart: function() {
                gsap.to(this.targets()[0], {
                    filter: "hue-rotate(360deg)", // Animate hue rotation
                    duration: 1.5,
                    ease: "power2.inOut",
                    repeat: -1,
                    yoyo: true
                });
            },
            onReverseComplete: function() {
                gsap.killTweensOf(this.targets()[0]); // Stop hue rotation on reverse
                gsap.set(this.targets()[0], { filter: "none" });
            },
            duration: 1.5,
            ease: "power2.inOut"
        });

        // --- Explosive Words (#text8) ---
        // Original effect relied on SplitText and mouse events, simplifying to a fade-in
        gsap.from("#text8", {
            scrollTrigger: {
                trigger: "#text8",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            opacity: 0,
            scale: 0.8,
            duration: 1,
            ease: "power2.out"
        });

        // --- Bloom from Blur (#text9) ---
        gsap.from("#text9", {
            scrollTrigger: {
                trigger: "#text9",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            opacity: 0,
            scale: 0.8,
            filter: "blur(20px) brightness(0.5)",
            duration: 1.2,
            ease: "power3.out"
        });

        // --- Glitch in Reality (#text10) ---
        // Original effect relied on SplitText for char-by-char glitch
        gsap.from("#text10", {
            scrollTrigger: {
                trigger: "#text10",
                start: "top 85%",
                toggleActions: "play none none reverse",
            },
            opacity: 0,
            x: () => gsap.utils.random(-5, 5),
            y: () => gsap.utils.random(-5, 5),
            rotationZ: () => gsap.utils.random(-2, 2),
            scale: () => gsap.utils.random(0.95, 1.05),
            repeat: -1,
            yoyo: true,
            duration: 0.08, // Fast glitch
            ease: "steps(1)"
        });

    </script>
</body>
</html>/* End custom CSS */