:root {
    --primary-yellow: #FFD700;
    --primary-white: #FFFFFF;
    --primary-black: #000000;
    --overlay-color: rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--primary-black);
    color: var(--primary-white);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* MARQUEE (Texto desplazante) */
.marquee-top, .marquee-bottom {
    background-color: var(--primary-yellow);
    color: var(--primary-black);
    padding: 12px 0; /* Un poco más de padding */
    overflow: hidden;
    position: relative;
    z-index: 10;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    width: 100%;
    display: flex; /* Asegura que el contenido se comporte bien */
}

.marquee-top {
    border-bottom: 2px solid var(--primary-black);
}

.marquee-bottom {
    border-top: 2px solid var(--primary-black);
    position: absolute;
    bottom: 0;
}

.track {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    /* La animación mueve el track hacia la izquierda indefinidamente */
    animation: marquee 20s linear infinite;
}

.marquee-top .track {
    animation-direction: normal; /* Izquierda */
}

.marquee-bottom .track {
    animation-direction: reverse; /* Derecha */
}

.content {
    /* Flex-shrink 0 evita que el texto se aplaste */
    flex-shrink: 0;
    padding-right: 0; 
    /* El espacio ya está incluido en el texto o podemos usar gap en track si lo soportara bien en animación, 
       pero padding-right en content es seguro */
}

/* Animación ajustada: 
   Si tenemos suficientes duplicados, moveremos hasta que el primer elemento desaparezca completamente
   y el segundo tome su lugar exacto.
   
   Truco para CSS Marquee infinito suave:
   Mover -100% de la longitud de UN bloque de contenido? No, mover todo el track no funciona si no sabemos el ancho.
   
   Mejor enfoque:
   Mover el track hacia la izquierda.
   Para que sea "seamless", necesitamos moverlo una distancia tal que el patrón se repita.
   Si todos los .content son iguales, moveremos -100% (del tamaño de un hijo) si usamos transform.
   Pero transform: translateX(-100%) se refiere al elemento mismo (.track).
   
   Si .track tiene muchos hijos, translateX(-50%) moverá la mitad de su ancho total.
   Si duplicamos el contenido TOTAL una vez (tenemos A y B idénticos), -50% mueve A fuera y deja B en su lugar.
   
   En el HTML he puesto 4 copias.
   Si muevo el track, necesito saber cuánto.
   
   Si uso translateX(-100%) relativo a UN elemento .content sería ideal, pero CSS no hace eso directamente en el padre.
   
   Solución robusta:
   Hacer que .track tenga 2 hijos grandes idénticos (cada uno conteniendo la repetición de texto necesaria para llenar pantalla).
   
   Pero ya puse 4 copias individuales.
   Asumamos que el ancho total es W.
   Queremos movernos una cantidad X tal que la posición visual sea idéntica al inicio.
   X = ancho de un .content.
   
   Si uso translateX(-25%) (ya que hay 4 elementos), moverá 1 elemento fuera.
*/

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-25%); } /* Mueve exactamente 1 de los 4 bloques, asumiendo que son iguales */
}

/* HERO SECTION */
.hero {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('portada C&C.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    /* Efecto de escala suave y constante */
    animation: backgroundMove 30s infinite alternate ease-in-out;
}

@keyframes backgroundMove {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

/* TIPOGRAFÍA */
.pre-title {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    color: var(--primary-yellow);
    letter-spacing: 5px;
    margin-bottom: -10px;
    opacity: 0;
    transform: translateY(-50px);
    animation: slideDown 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards 0.5s;
}

.brand-big {
    font-family: 'Anton', sans-serif;
    font-size: 15vw; /* Responsivo gigante */
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 3px var(--primary-white);
    text-transform: uppercase;
    margin: 10px 0;
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    animation: zoomIn 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards 0.8s;
}

/* Efecto de relleno animado en el título */
.brand-big::before {
    content: 'C&C';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--primary-white);
    overflow: hidden;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    animation: fillText 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards 1.8s;
}

.sub-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 40px;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards 2.5s;
}

.countdown-box {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards 3s;
}

.countdown-box p {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 2px;
}

.countdown-box .line {
    width: 50px;
    height: 2px;
    background: var(--primary-yellow);
    margin: 10px auto;
}

.countdown-box .features {
    font-weight: 700;
    color: var(--primary-yellow);
}

/* BOTÓN CTA */
.cta-button {
    display: inline-block;
    padding: 20px 40px;
    background: var(--primary-yellow);
    color: var(--primary-black);
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%, 0 25%); /* Forma angulada */
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards 3.5s;
}

.cta-button:hover {
    background: var(--primary-white);
    color: var(--primary-black);
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transition: 0.5s;
}

.cta-button:hover::after {
    left: 100%;
}

/* ANIMACIONES KEYFRAMES */
@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fillText {
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

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

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .brand-big {
        font-size: 20vw;
        -webkit-text-stroke: 1px var(--primary-white);
    }
    
    .pre-title {
        font-size: 1.2rem;
    }

    .sub-title {
        font-size: 1rem;
        letter-spacing: 3px;
    }

    .cta-button {
        padding: 15px 30px;
        font-size: 1rem;
    }
}