/* ------------------- */
/* FUENTES Y VARIABLES */
/* ------------------- */
@font-face {
    font-family: 'Acumin Variable Concept';
    src: url('../fonts/AcuminVariableConcept.woff2') format('woff2'),
         url('../fonts/AcuminVariableConcept.woff') format('woff');
    /* FIX: Definir el rango de peso para la fuente variable */
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-background: #f4f1e9;
    --color-text: #000000;
    --color-accent: #c9d840;
    --font-main: 'Acumin Variable Concept', sans-serif;
    --menu-size: clamp(20px, 1.8vw, 30px); 
    --menu-size-small: clamp(16px, 1.2vw, 22px); 
    --logo-width: 30%; /* Variable para alinear header y hero */
}

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

html{
    scroll-behavior: smooth;
    height: fill-available;
    height: -webkit-fill-available;
    scroll-padding-top: 50px;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text);
    font-weight: 600; 
    font-size: 36px;
    font-style: normal;
    /* FIX DEFINITIVO: Forzar la inclinación a 0 para fuentes variables en Safari */
    font-variation-settings: 'slnt' 0;
    font-synthesis: none; 
    line-height: 1.4;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ------------------- */
/* POPUP VERIFICACIÓN  */
/* ------------------- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(15px);
}

.popup-content {
    background-color: var(--color-background);
    padding: 40px;
    text-align: center;
    max-width: 90%;
    width: 500px;
    border: 5px solid #000;
}

.popup-content h2 {
    font-size: 30px;
    margin-bottom: 30px;
}

.popup-buttons button {
    font-family: var(--font-main);
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    margin: 0 20px;
    transition: color 0.3s ease;
    font-weight: 700;
}

.popup-buttons button:hover {
    color: var(--color-accent);
}

.hidden {
    display: none;
}

/* ------------------- */
/* HEADER              */
/* ------------------- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 500;
    transition: transform 0.4s ease-in-out;
    border-bottom: 1px solid #000;
    background-color: var(--color-background);
}

#main-header.hidden-header {
    transform: translateY(-100%);
}

.header-container {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    height: 100px;
}

.header-logo {
    font-family: var(--font-main);
    font-size: clamp(30px, 3.2vw, 50px);
    font-weight: 700;
    line-height: 1;
    border-right: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    white-space: nowrap;
    flex-basis: var(--logo-width);
    flex-shrink: 0;
}

/* El nav principal es ahora independiente */
nav.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    gap: clamp(20px, 4vw, 40px);
    padding: 0 40px;
    justify-content: space-evenly;
}

.nav-link {
    font-size: var(--menu-size);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
    font-weight: 700;
}

.nav-link:hover {
    border-color: var(--color-accent);
}

/* Nuevo contenedor para los controles de la derecha */
.header-right-controls {
    display: flex;
    align-items: stretch;
}

.lang-selector {
    font-size: var(--menu-size-small);
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 40px;
    border-left: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    white-space: nowrap;
}

.lang-selector a {
    padding-bottom: 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.lang-selector a.active {
    border-color: var(--color-accent);
}

/* --- ESTILOS HAMBURGUESA Y MENÚ MÓVIL (NUEVOS) --- */
.hamburger {
    display: none; /* Oculto en escritorio */
    padding: 15px;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    z-index: 1001;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 30px;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 4px;
    position: absolute;
    transition: transform 0.2s ease-in-out;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -1px;
}

.hamburger-inner::before, .hamburger-inner::after {
    content: '';
    display: block;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

.hamburger.is-active .hamburger-inner {
    transform: rotate(45deg);
}
.hamburger.is-active .hamburger-inner::before {
    top: 0;
    transform: rotate(90deg);
}
.hamburger.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(90deg);
}










/* ------------------- */
/* HERO SECTION        */
/* ------------------- */
#hero {
    height: 100vh;
    display: flex; /* Cambiado a flex para las columnas */
    padding-top: 100px; /* Espacio para el header fijo */
}

.hero-column {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-column.logo-circular{
    align-items: flex-end;
}

.hero-column-left {
    flex-basis: var(--logo-width); /* Mismo ancho que el logo del header */
    flex-shrink: 0;
    border-right: 1px solid #000;
}

.hero-column-right {
    flex-grow: 1;
    padding: 0 5vw;
}

.hero-text-content {
    width: 100%;
}

#hero-heading {
    display: flex;
    flex-direction: column; /* Por defecto, una frase encima de la otra */
    font-size: clamp(60px, 8.5vw, 85px);
    line-height: 1.1;
    text-transform: uppercase;
    text-align: left;
}

#typing-text {
    display: inline-block;
    min-height: 1.2em; /* Evita que el layout salte cuando el texto está vacío */
}

#typing-text::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.rotating-logo {
    width: 90%;
    margin: 5%;
    height: auto;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* ------------------- */
/* BANNERS             */
/* ------------------- */
.banner-black {
    background-color: var(--color-text);
    color: var(--color-background);
    padding: 20px;
    text-align: center;
    font-size: 28px;
}
.banner-black h2{ 
    color: var(--color-accent);
    font-size: 28px;
}

.banner-black .banner-big{
    color: var(--color-accent);
    font-size: clamp(50px, 5.5vw, 65px);
    line-height: 1;
}

/* ------------------- */
/* PRODUCT LIST        */
/* ------------------- */
.product-section {
    padding: 0; /* Ajustado el padding */
}

.product-list-container {
    position: relative;
    width: 100%;
}

.product-list {
    width: 100%; /* Ocupa todo el ancho */
}

.product-item {
    cursor: pointer;
    transition: background-color 0.4s ease;
    padding: 10px 40px 0;
    border-bottom: 1px solid var(--color-text);
}
.product-list li:first-child {
    border-top: 1px solid var(--color-text);
}

.product-item:hover {
    background-color: #e9e5d9; /* Un color de fondo sutil al pasar el ratón */
    color: var(--color-text);
}

.product-info {
    display: flex;
    align-items: baseline; /* Alinea los textos por su base */
    gap: 10px;
}

.product-info h3 {
    font-size: clamp(40px, 5vw, 60px);
    text-transform: uppercase;
    white-space: nowrap;
}

.product-info p {
    font-size: clamp(20px, 1.7vw, 28px); /* Aumentado el tamaño */
    font-weight: 600; /* Aumentado el grosor */
}

.product-image-display {
    position: fixed; /* Cambiado a fixed para que flote sobre todo */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: clamp(250px, 30vw, 400px);
    max-height: 80vh;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-image-display.visible {
    opacity: 1;
}

.product-image-display img {
    width: 100%;
    height: auto;
    max-height: 80vh; /* Para que no sea más alta que la pantalla */
    object-fit: contain;
}


/* ------------------- */
/* MARQUEE             */
/* ------------------- */
.marquee-green {
    background-color: var(--color-accent);
    color: var(--color-text);
    padding: 12px 0 5px;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

.marquee-content span {
    font-size:clamp(40px, 5vw, 60px);
    margin-right: 50px;
}

@keyframes marquee {
    from { transform: translateX(0%); }
    to { transform: translateX(-50%); }
}

/* ------------------- */
/* OTRAS SECCIONES     */
/* ------------------- */
.text-big-section {
    padding: 150px 40px;
    text-align: center;
}

.text-big-section h2 {
    font-size: 90px;
    font-weight: 500;
    line-height: 1.2;
    max-width: 30ch;
    margin: 0 auto;
}

.game-link-section {
    border-top: solid 1px var(--color-text);
    width: 100%;
    padding: 100px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.game-link-action {
    width: 100%;
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.game-link-action h3 {
    font-size: clamp(40px, 4vw, 80px);
    line-height: 1;
    margin-bottom: 20px;
}

.game-link-action p {
    font-size: clamp(18px, 1.6vw, 24px);
    line-height: 1;
    margin-bottom: 20px;
}

.play-button {
    display: inline-block;
    font-size: var(--menu-size);
    padding: 15px 40px 10px;
    border: 2px solid var(--color-text);
    border-radius: 50px;
    margin-top: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.play-button:hover {
    background-color: var(--color-accent);
    border-color: var(--color-text);
}

/* ------------------- */
/* CONTACTO (COLUMNAS) */
/* ------------------- */
.contact-section-columns {
    display: flex;
    border-top: 1px solid #000;
}

.contact-column {
    padding: 80px 40px;
}

.contact-column-left {
    flex-basis: var(--logo-width);
    flex-shrink: 0;
    border-right: 1px solid var(--color-text);
    text-align: center;
}

.contact-column-right {
    flex-grow: 1;
    padding-left: 5vw;
    text-align: center;
}

.contact-column h3 {
    font-size: clamp(40px, 5vw, 60px);
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--color-text);
}

.contact-column p {
    font-size: clamp(18px, 1.6vw, 24px);
    font-weight: 700;
    line-height: 1.5;
}

.contact-column p a:hover {
    text-decoration: underline;
}


/* ------------------- */
/* FOOTER              */
/* ------------------- */
.main-footer {
    background-color: var(--color-text);
    color: var(--color-background);
    padding: 0 0px 40px;
    font-weight: 400; /* Regular */
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Alinear items verticalmente */
    padding: 0 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-background);
}

.footer-contact-item {
    font-size: clamp(18px, 1.6vw, 24px);
    padding: 20px 20px;
    border-right: 1px solid var(--color-background);
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-contact-item:first-child {
    padding-left: 0;
    justify-content: flex-start;
}

.footer-contact-item:last-child {
    border-right: none;
    padding-right: 0;
    justify-content: flex-end;
    text-transform: uppercase;
}

.footer-legal {
    font-size: 14px;
    font-weight: 300;
    padding: 0 40px 40px;
}

.footer-legal a {
    margin-right: 15px;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.footer-brand-title {
    font-size: clamp(60px, 10vw, 120px);
    font-weight: 600;
}

.footer-brand-logo {
    width: clamp(100px, 16vw, 300px);
    height: auto;
}

/* ------------------- */
/* PÁGINAS LEGAL/404   */
/* ------------------- */
.legal-page-content, .error-404-section {
    padding: 150px 40px 50px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-page-content h1 {
    font-size: clamp(40px, 5vw, 60px);
    margin-bottom: 40px;
}

.legal-page-content .text-content {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
}

.error-404-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - 100px); /* 100px es el alto del header */
}

.error-404-section .error-image {
    width: 100%;
    max-width: 300px;
    margin-bottom: 40px;
}

.error-404-section h2 {
    font-size: clamp(40px, 5vw, 60px);
    margin-bottom: 20px;
}














/* ------------------- */
/* RESPONSIVE DESIGN   */
/* ------------------- */
@media (max-width: 1200px) {
    
    #hero h1, .text-big-section h2, .product-list, .game-intro h2 {
        font-size: 9vw;
    }
    .popup-buttons button {
        font-size: 28px;
        color:#000;
    }
}

@media (max-width: 900px) { /* Un punto de ruptura más adecuado para el menú */
    body {
        font-size: 28px;
    }
    #main-header {
        padding: 0;
        height: auto;
    }
    .header-container {
        flex-direction: column;
        height: auto;
        width: 100%;
        align-items: stretch;
    }
    
    .header-logo {
        flex-grow: 1;
        border-right: none;
        padding: 15px 0;
    }
    .header-right-controls{ 
        border-top: 1px solid #000;
        justify-content: space-between;
    }

    /* La navegación principal se convierte en el panel deslizable */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        background-color: var(--color-background);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(-100%); /* Empieza fuera de la pantalla a la izquierda */
        transition: transform 0.4s ease-in-out;
        z-index: 1000;
    }

    .main-nav.is-open {
        transform: translateX(0);
        margin-top: 66px;
    }
    
    .hamburger {
        display: block; /* Se muestra la hamburguesa */
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 0;
        margin-top: -66px;
    }

    .nav-link {
        font-size: 24px;
    }

    /* El selector de idiomas se queda en la barra */
    .lang-selector {
        border-left: none; /* Quitamos el borde izquierdo en móvil */
        padding: 0 20px;
    }




    
    #hero {
        flex-direction: column-reverse; /* Invertir el orden de las columnas */
        padding-top: 200px; /* Ajustar para el nuevo alto del menú */
        height: auto;
    }
    .hero-column-left {
        border-right: none;
        border-bottom: 1px solid #000;
        width: 100%;
        flex-basis: auto;
        padding: 0 0 40px 0;
        align-items: flex-end; /* Alinear el logo abajo */
        text-align: center;
    }
    .hero-column-left .rotating-logo{
        width: 80%;
        margin: auto;
    }
    .hero-column-right {
        padding: 0 20px 40px 20px;
    }
    #hero-heading {
        text-align: center;
    }

    .product-list-container {
        flex-direction: column;
        align-items: center;
    }
    .product-list {
        width: 100%;
        text-align: center;
    }
    .product-image-display {
        position: fixed;
        width: 60vw;
        height: auto;
        max-height: 60vh;
    }
    .product-item:hover {
        transform: translateX(0);
    }
    .product-info {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    /* FIX: Ajustar el texto del producto en móvil */
    .product-info h3 {
        white-space: normal; /* Permitir que el texto se divida en varias líneas */
        text-align: center; /* Centrar el texto que se ha dividido */
    }
    .game-link-section, .contact-section-columns {
        flex-direction: column;
        text-align: center;
    }
    .contact-column-left {
        border-right: none;
        border-bottom: 1px solid var(--color-text);
        width: 100%;
    }
    .contact-column {
        padding: 40px 40px;
    }
    .footer-top {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        border: none;
        padding-bottom: 15px;
        margin-bottom: 15px;
        padding-top: 30px;
    }
    .footer-contact-item {
        border: none;
        padding: 0;
        text-align: center !important;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        text-align: center;
    }
    .footer-legal {
        padding: 0 0px 40px;
        text-align: center;
    }



    .game-container {
        flex-direction: column;
        height: auto;
    }
    .stickers-palette {
        position: static;
        flex-direction: row;
        width: 100%;
        height: auto;
        justify-content: center;
        margin-top: 20px;
        padding: 10px;
    }
    .sticker {
        width: 60px;
    }
    .legal-page-content, .error-404-section {
    padding: 220px 40px 50px;
    }
}


@media (max-width: 480px) {
    .popup-content h2{
        font-size: 24px;
    }
    .popup-buttons button{
        font-size: 24px;
    }
    .header-container{
        padding-top: 5px;
    }
    .main-nav ul{
        padding: 0 15px;  
    }
    .lang-selector{
        padding-bottom: 0;
    }
    #hero{
        padding-top: 170px;
    }
    .hero-column-left{
        padding-bottom: 30px;
    }
    .hero-column-left .rotating-logo{
        width: 120px;
    }
    .hero-column-right{
        padding: 0 15px 30px 15px;
        border-bottom: 1px solid #000;
        margin-bottom: 30px;
    }

    #hero h1, .text-big-section h2, .product-list, .game-intro h2 {
        font-size: 24px;
    }
    .banner-black h2 {
        font-size: 18px;
    }
    .banner-black p {
        font-size: 18px;
    }
    .product-info {
        line-height: 1.1;
    }
    .product-info h3{
        font-size: 24px;
    }
    .product-info p{
        font-size: 16px;
    }
    .product-item {
        padding: 10px 40px;

    }
    .marquee-content span{
        font-size: 24px;
    }
    .contact-column{
        padding: 20px 15px;
    }
    .contact-column h3{
        font-size: 24px;
    }
    .contact-column p{
        font-size: 18px;
    }
    .game-link-section{
        padding: 20px 30px;
    }
    .game-link-action h3{
        font-size: 24px;
    }
    .game-link-action p{
        font-size: 16px;
    }
    .text-big-section {
        padding: 40px 15px;
    }
        .text-big-section h2 {
        font-size: 24px;
    }
    .footer-top {
        padding-top: 30px;
    }
    .footer-legal {
        padding: 0 0px 40px;
        text-align: center;
    }
    .footer-bottom {
        text-align: center;
    }
    .footer-contact-item{
        font-size: 16px;
    }
    .footer-brand-title{
        font-size: 34px;
    }
}


.oculto{
    display: none;
}
.white{ 
    color: #FFF !important;
}




























/* ------------------- */
/* PÁGINA DEL JUEGO    */
/* ------------------- */
.game-page {
    background-color: var(--color-background);
}

.game-section {
    padding: 150px 40px 40px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px); /* Ocupa el alto de la pantalla menos el header */
}

.game-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 10px;
    margin-bottom: 20px;
    flex-direction: column;
}

.game-intro h2 {
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1;
    text-align: left;
}

.game-intro p {
    font-size: clamp(16px, 1.5vw, 20px);
    font-weight: 700;
}

.game-area {
    flex-grow: 1;
    position: relative;
    width: 100%;
    max-width: 1800px; /* Ancho máximo para centrar el contenido */
    margin: 0 auto; /* Centrar el área de juego */
}

.swan-image {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    height: 150%;
    width: auto;    /* Ancho automático para mantener la proporción */
    user-select: none;
    -webkit-user-drag: none;
}

.sticker-item {
    position: absolute;
    cursor: grab;
    transition: transform 0.2s, border-color 0.3s;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    border: 2px dashed transparent;
    height: auto; /* Altura automática para mantener proporción */
}

.sticker-item.active {
    border-color: var(--color-accent);
    border-width: 1px;
    border-radius: 50px;
    z-index: 100;
}

.sticker-item.dragging {
    cursor: grabbing;
    z-index: 101; /* Asegura que esté por encima de otros stickers al arrastrar */
}

/* Clases de tamaño para los stickers */
.sticker-item.small { width: 4vw; min-width: 40px; }
.sticker-item.normal { width: 9vw; min-width: 80px; }
.sticker-item.big { width: 12vw; min-width: 130px; }
.sticker-item.super-big { width: 18vw; min-width: 160px; } /* 50% más grande que 'big' */
.sticker-item.mega-big { width: 28vw; min-width: 200px;  }


/* ------------------- */
/* RESPONSIVE DESIGN   */
/* ------------------- */

@media (max-width: 900px) { 

    .game-section {
        padding: 120px 20px 20px;
    }

    .game-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding-top: 100px;
    }

    .game-area {
        margin-top: 20px;
    }

    .swan-image {
        height: 120%;
        
    }

    .sticker-item.small { width: 10vw; }
    .sticker-item.normal { width: 13vw; }
    .sticker-item.big { width: 16vw; }
    .sticker-item.super-big { width: 24vw; }
    .sticker-item.mega-big { width: 28vw; }
}
@media (max-width: 480px) {
    .game-section{
        padding: 120px 15px 20px;;
    }
    .game-intro{
        padding-top: 40px;
    }
    .game-intro h2{
        width: 100%;
        font-size: 24px;
    }
    .game-intro p {
        font-size: 18px;
        font-weight: 700;
        width: 100%;
        text-align: left;
    }
    .swan-image {
        height: 100%;
        right: 0;
        top: 180px;
    }
}