:root {
    --bg-color: #030303;
    --text-color: #EAEAEA;
    --accent-15: #FFD700;
    --accent-mapping: #00F0FF;
    --accent-bodas: #D4AF37;
    --accent-clips: #FF2A5F;
    --glass-bg: rgba(25, 25, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
}

/* Custom Cursor & Effects */
.film-grain {
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    background: transparent url('https://upload.wikimedia.org/wikipedia/commons/7/76/1k_Dissolve_Noise_Texture.png') repeat 0 0;
    background-repeat: repeat;
    animation: grainAnimation 1s steps(10) infinite;
    opacity: 0.05;
    pointer-events: none;
    z-index: 9998; /* Just below cursor */
}

@keyframes grainAnimation {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
    100% { transform: translate(0, 0); }
}

body {
    cursor: none;
}
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.content {
    position: relative;
    z-index: 10;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    z-index: 10;
    perspective: 1000px;
}

.nav-btn {
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    backdrop-filter: blur(10px);
    transition: background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
    transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(var(--scale, 1));
}

.nav-btn:hover {
    --scale: 1.1;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.15), 0 0 15px rgba(255, 255, 255, 0.1);
    color: var(--accent-15);
    z-index: 20;
}

/* Film Transition Overlay */
.film-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    pointer-events: none;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.film-transition-overlay.active {
    transform: translateY(0);
}

.film-transition-overlay.exit {
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.film-strip {
    width: 100%;
    height: 100%;
    background-color: transparent;
    position: relative;
    border-top: 5vh solid #111;
    border-bottom: 5vh solid #111;
}

.film-strip::before, .film-strip::after {
    content: "";
    position: absolute;
    top: -5vh;
    bottom: -5vh;
    width: 8vw;
    min-width: 50px;
    background-color: #030303;
    background-image: repeating-linear-gradient(to bottom, #fff 0px, #fff 20px, transparent 20px, transparent 40px);
    background-size: 15px 40px;
    background-position: center;
    background-repeat: repeat-y;
}

.film-strip::before { left: 0; border-right: 2px solid #222; }
.film-strip::after { right: 0; border-left: 2px solid #222; }

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    padding: 12px 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 30px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--accent-15);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.15), 0 0 15px rgba(255, 255, 255, 0.1);
}

.glitch {
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: -2px;
    position: relative;
    display: inline-block;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.4), 0 0 10px rgba(255, 255, 255, 0.2);
    z-index: 5;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #aaa;
    margin-top: 10px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.scroll-indicator span {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #fff, transparent);
    animation: scrollLine 2s infinite ease-in-out;
}

@keyframes scrollLine {
    0% { transform: translateY(-10px) scaleY(0); transform-origin: top; }
    50% { transform: translateY(0) scaleY(1); transform-origin: top; }
    50.1% { transform-origin: bottom; }
    100% { transform: translateY(10px) scaleY(0); transform-origin: bottom; }
}

/* Sections */
.category-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 5%;
    position: relative;
    perspective: 1500px; /* Crucial for 3D tilts */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 80px;
    width: 100%;
}

.container.reverse {
    flex-direction: row-reverse;
}

.text-content {
    flex: 1;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    
    /* Efecto de vidrio (glassmorphism) */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.category-section.in-view .text-content {
    opacity: 1;
    transform: translateY(0);
}

.text-content h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff, #777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-content p {
    font-size: 1.2rem;
    color: #999;
    line-height: 1.6;
    font-weight: 300;
}

/* 3D Video Container */
.video-container {
    flex: 1.5;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out; /* Smooth follow */
    will-change: transform;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    transform: translateZ(50px); /* Lifts the video up from the container base */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
}

/* Specific Section Theming */
#quinceanos .video-wrapper, #quinceanos-backstage .video-wrapper, #quinceanos-clips .video-wrapper {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.15);
}

#mappings .video-wrapper, #shows-visuales .video-wrapper {
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.2);
}

#videoclips .video-wrapper {
    box-shadow: 0 0 40px rgba(255, 42, 95, 0.15);
    border-color: rgba(255, 42, 95, 0.2);
}

/* Category Tags and Sub-sections */
.category-tag {
    display: inline-block;
    color: var(--accent-15);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 6px 15px;
    border-radius: 30px;
    background: rgba(255, 215, 0, 0.05);
}

.sub-category-section {
    min-height: auto;
    padding-top: 40px;
    padding-bottom: 80px;
}

#bodas .video-wrapper {
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.15);
}

/* Info & Contact Sections */
.info-section .grid-content, .contact-section .grid-content {
    flex: 1.5;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    transform: translateZ(50px);
}

.glass-card h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.glass-card ul, .text-content ul {
    list-style: none;
    margin-top: 15px;
}

.glass-card ul li, .text-content ul li {
    font-size: 1.1rem;
    color: #bbb;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.glass-card ul li::before, .text-content ul li::before {
    content: '▸';
    color: var(--accent-15);
    margin-right: 10px;
    font-size: 1.2rem;
    margin-top: 2px;
}

.text-content ul li strong {
    color: #fff;
    margin-right: 5px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    transform: translateZ(50px);
}

.glass-btn {
    padding: 15px 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.glass-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

.glass-btn.whatsapp {
    border-color: rgba(37, 211, 102, 0.5);
    color: #25D366;
}

.glass-btn.whatsapp:hover {
    background: rgba(37, 211, 102, 0.1);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

/* Reseñas Banner */
.center-banner {
    justify-content: center;
}

.banner-content {
    flex: none;
    width: 100%;
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-content p {
    margin-bottom: 35px;
}

.instagram-highlight-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    padding: 18px 35px;
    background: linear-gradient(45deg, rgba(245, 133, 41, 0.15), rgba(221, 42, 123, 0.15), rgba(129, 52, 175, 0.15));
    border-color: rgba(221, 42, 123, 0.5);
    box-shadow: 0 15px 30px rgba(221, 42, 123, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.instagram-highlight-btn:hover {
    background: linear-gradient(45deg, rgba(245, 133, 41, 0.3), rgba(221, 42, 123, 0.3), rgba(129, 52, 175, 0.3));
    box-shadow: 0 20px 40px rgba(221, 42, 123, 0.25);
    border-color: rgba(221, 42, 123, 0.8);
    transform: translateY(-5px) scale(1.02);
}

.ig-icon {
    font-size: 1.5rem;
}

.highlight {
    color: #fff !important;
    font-weight: 500;
    font-size: 1.5rem !important;
    margin-bottom: 10px;
}

.mt-3 {
    margin-top: 20px;
}

/* Premios Section */
.premios-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.award-card {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-left: 4px solid var(--accent-15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.award-card:hover {
    transform: translateX(10px) translateZ(60px);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.1);
    border-color: #fff;
}

.award-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.award-card h3 {
    border-bottom: none;
    margin-bottom: 5px;
    padding-bottom: 0;
    font-size: 1.4rem;
}

.award-card p {
    font-size: 1rem;
    color: #999;
    margin: 0;
}

.hook-phrase {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--accent-15);
    font-style: italic;
    margin-bottom: 25px;
    line-height: 1.4;
}

.director-photo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.director-photo {
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--glass-border);
    object-fit: cover;
    filter: contrast(1.1) brightness(0.9);
}

/* Footer */
.footer {
    text-align: center;
    padding: 60px 40px 40px;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.footer-logo-container {
    margin-bottom: 30px;
}

.footer-logo {
    max-width: 250px;
    opacity: 0.7;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
    transition: opacity 0.3s, filter 0.3s;
}

.footer-logo:hover {
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.4));
}

.version-number {
    margin-top: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 2px;
    font-family: monospace;
}

/* Novelty Section (Holograma) */
.badge-novedad {
    display: inline-block;
    background: linear-gradient(90deg, #00F0FF, #D4AF37);
    color: #000;
    font-weight: 900;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 240, 255, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(0, 240, 255, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 240, 255, 0.4); }
}

.novelty-content {
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 30px 60px rgba(0, 240, 255, 0.1);
}

.text-content .novelty-list li::before {
    content: '✅';
    font-size: 1.1rem;
    margin-top: 0;
}

.novelty-video .video-wrapper {
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.4);
}

/* WhatsApp Floating Ecosystem */
.whatsapp-wrapper {
    position: fixed;
    top: calc(100% - 95px);
    left: calc(100% - 95px);
    z-index: 1000;
    transition: top 1.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
                left 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.whatsapp-float {
    width: 65px;
    height: 65px;
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #25D366;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3), inset 0 0 15px rgba(37, 211, 102, 0.2);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
}

.whatsapp-wrapper:hover .whatsapp-float {
    background: rgba(37, 211, 102, 0.4);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.6), inset 0 0 20px rgba(37, 211, 102, 0.5);
    color: #fff;
}

/* Responsive */
@media (max-width: 968px) {
    .container, .container.reverse {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    /* IMPORTANTE: Al estar en columna y centrados, pierden su ancho. Forzamos 100% */
    .text-content, .video-container, .grid-content {
        width: 100%;
    }
    
    .glitch { font-size: 4rem; }
    .text-content h2 { font-size: 2.5rem; }
    
    .social-links {
        justify-content: center;
    }

    body { cursor: auto; }
    #cursor { display: none; }
    
    /* Desactivar transformaciones 3D pesadas en móvil para evitar bugs visuales */
    .video-wrapper, .glass-card, .director-photo {
        transform: none !important;
    }
}

@media (max-width: 768px) {
    .film-grain {
        animation: none; /* OPTIMIZACIÓN: Desactivar animación de grano en móviles para ahorrar batería y GPU */
        opacity: 0.03;
    }

    .hero-content.visible {
        transform: translateY(15vh); /* Bajar el texto y botones para dejar espacio a la claqueta 3D */
    }
    
    /* Optimizar botonera hero para móvil */
    .hero-nav {
        gap: 10px;
        margin-top: 20px;
        padding: 0 5px;
    }
    
    .nav-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    
    .category-section {
        padding: 60px 20px;
    }
    
    .text-content {
        padding: 25px; /* Reducir padding en móviles */
    }
    
    .hook-phrase {
        font-size: 1.4rem;
    }
    
    .director-photo {
        max-width: 100%;
    }
    
    .glass-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .glitch { font-size: 3rem; }
    .text-content h2 { font-size: 2rem; }
    
    .footer {
        padding: 40px 20px 20px;
    }
    
    /* Optimizar botón INICIO (Back to top) */
    .back-to-top {
        bottom: 20px;
        left: 20px;
        padding: 8px 15px;
    }
    .back-to-top span {
        font-size: 0.8rem !important;
        letter-spacing: 0.5px !important;
    }
    
    .whatsapp-wrapper {
        top: calc(100% - 70px) !important;
        left: calc(100% - 70px) !important;
    }
    .whatsapp-float {
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}
