/* ==========================================================================
   Reseteo General, Fuentes y Ocultación del Cursor Nativo
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body, a, .project, .logo-slide, button {
    cursor: none !important; /* Ocultamos el puntero por defecto en toda la web */
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0727e5, #080116);
}

/* ==========================================================================
   🎯 CIRCUNFERENCIA CUSTOM CURSOR (FIJO ROSA)
   ========================================================================== */
.custom-cursor {
    width: 15px;
    height: 15px;
    background-color: transparent;
    border: 2px solid #ff5ca8; /* Circunferencia rosa constante */
    border-radius: 50%;
    position: fixed;
    top: 0;        
    left: 0;       
    pointer-events: none; 
    z-index: 9999999 !important; /* Por encima de absolutamente todo siempre */
    transform: translate(-50%, -50%);
    
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff5ca8;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0px; /* Escondido por defecto */
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                height 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                font-size 0.2s ease,
                background-color 0.3s ease;
    will-change: left, top, width, height;
}

/* CUANDO HOVER ELEMENTOS INTERACTIVOS */
.custom-cursor.expand {
    width: 30px;  
    height: 30px;
    background-color: rgba(255, 92, 168, 0.1); /* Fondo translúcido rosa súper sutil */
    font-size: 11px; /* La palabra 'abrir' aparece si se inyecta desde JS */
}

/* ==========================================================================
   📌 MENÚ DE NAVEGACIÓN DETECTA SCROLL (SIN BARRA, TEXTO ROSA EN HOVER)
   ========================================================================== */
.navbar {
    position: fixed; /* Hace que el menú te persiga por toda la web al bajar */
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 8%;
    z-index: 999999; /* Z-index masivo para que no lo pise ninguna sección */
    background: transparent; /* Totalmente transparente siempre visualmente */
    transition: padding 0.3s ease;
}

/* Al bajar la página el menú se compacta un pelín elegantemente */
.navbar.scrolled {
    padding: 20px 8%;
}

.nav-container {
    display: flex;
    justify-content: flex-end; /* Empuja el menú a la derecha al no haber logo */
    align-items: center;
    width: 100%;
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

/* ⚪ ESTADO INICIAL: Letras blancas sobre el Hero oscuro */
.nav-link {
    color: #ffffff; 
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    padding: 5px 0;
    transition: color 0.2s ease; /* Transición rápida y limpia para el color del texto */
}

/* 🔵 ESTADO SCROLLED: Cuando entramos en la zona blanca, cambian a tu Azul exacto */
.navbar.scrolled .nav-link {
    color: #0727e5; 
}

/* 💗 EFECTO HOVER: Cambia el texto a rosa flúor tanto si estaba en blanco como en azul */
.nav-link:hover,
.navbar.scrolled .nav-link:hover {
    color: #ff5ca8 !important;
}

/* 🍔 BOTÓN HAMBURGUESA */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    z-index: 110;
}

/* Las rayitas empiezan en blanco */
.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 5px;
    transition: all 0.3s ease-in-out, background-color 0.3s ease;
}

/* Si bajamos la página, las rayitas de la hamburguesa también se vuelven azules */
.navbar.scrolled .menu-toggle .bar {
    background-color: #0727e5;
}

/* ==========================================================================
   Hero Section (Textos más grandes y potentes - "El Giro") 🚀
   ========================================================================== */
.hero {
    background: transparent;
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center; 
    padding: 40px 8%;
    position: sticky;
    top: 0;
    z-index: 1;
    overflow: hidden;
    transition: filter .2s ease, transform .2s ease;
    box-sizing: border-box;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, #0727e5, #0b0f3a, #0727e5);
    background-size: 300% 300%;
    animation: gradientMove 12s ease infinite;
    z-index: -1;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero Content elástico */
.hero-content {
    width: 100%;
    padding-left: clamp(20px, 12vw, 200px); 
    margin-top: 20px;
}

/* Subtítulo más grande de base */
.hero h2 {
    font-size: clamp(2.2rem, 4.5vw, 4rem); 
    font-weight: 700;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

/* Tu nombre/frase principal con escala masiva e impactante */
.typing {
    font-size: clamp(4rem, 9.5vw, 11.5rem); 
    font-weight: 900;
    color: #ff5ca8;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
    line-height: 1.05;
    word-break: break-word;
}

.cursor {
    animation: blink .7s infinite;
}

/* ==========================================================================
   Contenido Blanco (Estructura)
   ========================================================================== */
.content-wrapper {
    position: relative;
    z-index: 2;
}

.white-section {
    background: white;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -20px 50px rgba(0,0,0,.08);
    position: relative;
    z-index: 2; 
    padding: clamp(60px, 8vh, 120px) 8%;
}

@media (min-width: 768px) {
    .white-section {
        border-radius: 60px 60px 0 0;
    }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    position: relative;
    z-index: 2;
    min-height: auto; 
    padding: 40px 0;
    background: transparent;
}

.about-text {
    width: 100%;
    max-width: 750px;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem); 
    line-height: 1.6;
    color: #0727e5;
    opacity: 0;
    transform: translateY(60px);
    filter: blur(10px);
    transition: all 1.4s cubic-bezier(0.19, 1, 0.22, 1);
    margin-left: clamp(0px, 8vw, 120px);
    margin-top: 40px;
}

.about-text.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.highlight {
    position: relative;
    display: inline;
    color: inherit;
}

.highlight::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.1em;
    width: 100%;
    height: 0.5em;
    background: #ff5ca8;
    opacity: 0.5;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.about-text.show .highlight::after {
    transform: scaleX(1);
    transition-delay: 0.6s;
}

/* Frase Animada */
.frase {
    font-size: clamp(2.2rem, 6vw, 5rem); 
    font-weight: 800;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #0727e5;
}

.line {
    display: block;
    line-height: 1.1;
    width: 100%;
}

.left { text-align: left; }
.right { text-align: right; }

@media (max-width: 768px) {
    .right { text-align: left; }
}

.font-alt {
    font-family: "Playfair Display", serif;
    font-weight: 600;
    font-size: 1.05em;
    font-style: italic;
    color: #0727e5;
}

/* ==========================================================================
   Proyectos Horizontal Scroll (Tamaños Originales de Desktop respetados) 💻
   ========================================================================== */
.projects-section {
    height: 350vh; 
    position: relative;
    margin-top: 100px;
}

.projects-viewport {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center; 
}

.projects-static-header {
    position: absolute;
    top: -30px; 
    left: 8%;  
    display: flex;
    align-items: center;
    gap: 25px;
    z-index: 10;
}

.projects-title {
    font-size: 3.8rem; 
    font-weight: 900;
    color: #0727e5;
    margin: 0;
    white-space: nowrap;
    overflow: hidden; 
}

.projects-title span {
    display: block;
    transform: translateY(110%);
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.projects-section.active .projects-title span {
    transform: translateY(0);
}

.projects-title-arrow {
    width: 60px;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0.4s;
    
}

.projects-section.active .projects-title-arrow {
    opacity: 1;
    transform: translateX(0);
}

@keyframes pulseArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(12px); }
}

.projects-track {
    display: flex;
    width: max-content;
    height: auto;
    align-items: center;
    gap: 80px; /* Separación original de tu diseño */
    padding-left: 8%;  
    padding-right: 25vw; 
    will-change: transform;
    transform: translateY(40px); 
}

/* 🎯 CAJAS DEL MISMO TAMAÑO EXACTO ORIGINAL DE TU ORDENADOR */
.project {
    min-width: 60vw; /* Tu proporción original */
    flex-shrink: 0;
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project:hover {
    transform: translateY(-10px);
}

/* Las imágenes respetan la maquetación nativa de 400px de alto */
.project-img {
    width: 100%;
    height: 400px; /* Tu altura fija de Desktop */
    object-fit: cover; /* Evita que las imágenes de Illustrator se deformen */
    border-radius: 12px;
    border: 2px solid #0b2eff;
    transition: transform 0.6s ease;
}

.project:hover .project-img {
    transform: scale(1.03);
}

.project h3 {
    margin-top: 15px;
    font-size: 2.5rem; /* Tus textos grandes originales */
    color: #0727e5;
    font-weight: 900;
}

.project span {
    color: #ff5ca8;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ==========================================================================
   Animaciones Globales y Media Queries
   ========================================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 1024px) {
    .hero-content { padding-left: 40px; }
    .projects-title { font-size: 3rem; }
    .companies-title { font-size: 2.8rem; }
}

/* ==========================================================================
   Sección Empresas (Carrusel Infinito Automático)
   ========================================================================== */
.companies-section {
    background-color: #0727e5; 
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 140px 0; 
    z-index: 3; 
    overflow: hidden;
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    position: relative;
    width: 100%; 
}

.companies-title {
    color: white;
    font-size: 4rem; 
    font-weight: 800;
    text-align: center;
    margin-bottom: 70px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.marquee-container::before,
.marquee-container::after {
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    content: "";
    z-index: 2;
}
.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #0727e5, transparent);
}
.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #0727e5, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 40px; 
    animation: scrollMarquee 28s linear infinite; 
}

.logo-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;   
    width: 190px;   
    margin: 0 15px; 
    position: relative; 
    transform: scale(var(--escala, 1)); 
}

.logo-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    position: absolute; 
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

.logo-slide .img-default {
    opacity: 0.85;
    filter: brightness(0) invert(1);
    z-index: 2; 
}

.logo-slide .img-hover {
    opacity: 0;
    z-index: 1; 
}

.logo-slide:hover .img-default {
    opacity: 0; 
}

.logo-slide:hover .img-hover {
    opacity: 1;   
    z-index: 3;   
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   📱 Media Query para Dispositivos Móviles (Responsive Hamburguesa)
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; 
    }

    .nav-menu {
        position: fixed;
        top: -100vh; 
        left: 0;
        flex-direction: column;
        background: #0727e5; 
        width: 100%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        gap: 35px;
        transition: top 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 105;
    }

    .nav-menu.active {
        top: 0;
    }

    .nav-menu.active .nav-link {
        color: #ffffff !important;
        font-size: 2rem; 
    }
    
    .nav-menu.active .nav-link:hover {
        color: #ff5ca8 !important;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background-color: #ff5ca8 !important;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background-color: #ff5ca8 !important;
    }
}

html {
    scroll-behavior: smooth !important;
}

/* ==========================================================================
   ✨ EFECTO DINÁMICO: TEXTOS QUE SUBEN AL HACER SCROLL
   ========================================================================== */
.efecto-revelar {
    opacity: 0;
    transform: translateY(50px); 
    filter: blur(10px);          
    transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1); 
    will-change: transform, opacity, filter;
}

.efecto-revelar.show {
    opacity: 1;
    transform: translateY(0);    
    filter: blur(0);             
}

/* ==========================================================================
   🏁 FOOTER PREMIUM AZUL (Contacto, Formulario y RRSS)
   ========================================================================== */
.project-footer {
    background-color: #0727e5; 
    color: #ffffff;
    padding: 100px 8% 40px 8%;
    width: 100%;
    position: relative;
    z-index: 10;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Columna Izquierda --- */
.footer-brand-side {
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 25px;
}

.font-alt-footer {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-weight: 500;
    color: #ffffff;
}

.footer-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 450px;
}

.footer-socials {
    display: flex;
    gap: 30px;
    margin-top: 20px; 
}

.social-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s ease; 
}

.social-link:hover {
    color: #ff5ca8 !important;
}

/* --- Columna Derecha: Formulario --- */
.footer-form-side {
    width: 50%;
}

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.form-group input,
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px 5px;
    color: #ffffff;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #ff5ca8;
}

.btn-submit {
    align-self: flex-start;
    background-color: #ffffff;
    color: #0727e5;
    border: none;
    padding: 16px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-submit:hover {
    background-color: #ff5ca8; 
    color: #ffffff;
    transform: translateY(-3px);
}

/* --- Barra de Créditos --- */
.footer-bottom {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 60px;
    }
    
    .footer-brand-side, .footer-form-side {
        width: 100%;
    }
    
    .footer-title {
        font-size: 2.5rem;
    }
    
    .footer-socials {
        margin-top: 20px;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        margin-top: 50px;
    }
}

.navbar.en-footer .nav-link {
    color: #ffffff !important;
}

.navbar.en-footer .nav-link:hover {
    color: #ff5ca8 !important; 
}

.navbar.en-footer .menu-toggle .bar {
    background-color: #ffffff !important;
}

