
/* Reinicio básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    background: #101014;
    font-family: Georgia, "Times New Roman", serif;
}

/* Fondo de la portada */
.portada {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: clip;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    padding: clamp(24px, 5vh, 55px) 16px 180px;

    background-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.58) 0%,
            rgba(0, 0, 0, 0.38) 45%,
            rgba(0, 0, 0, 0.72) 100%
        ),
        url("imagenes/portada1.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Humo artificial en la parte inferior */
.portada::before {
    content: "";
    position: absolute;
    z-index: -1;

    left: -15%;
    bottom: -8%;
    width: 130%;
    height: 42%;

    background:
        radial-gradient(
            ellipse at 18% 75%,
            rgba(190, 197, 205, 0.40),
            transparent 52%
        ),
        radial-gradient(
            ellipse at 48% 90%,
            rgba(155, 164, 175, 0.36),
            transparent 48%
        ),
        radial-gradient(
            ellipse at 78% 65%,
            rgba(205, 204, 195, 0.32),
            transparent 50%
        );

    filter: blur(22px);
    opacity: 0.9;
    animation: movimiento-humo 9s ease-in-out infinite alternate;
}

/* Título completo */
.titulo {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    color: white;
}

/* ¿Qué personaje de */
.titulo-superior {
    font-size: clamp(1.6rem, 4.5vw, 4rem);
    font-weight: bold;
    text-shadow: 0 4px 9px #000;
    margin-bottom: -0.08em;
}

/* ONE PIECE */
.logo {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.2rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.045em;
    white-space: nowrap;

    background: linear-gradient(
        to bottom,
        #fff0a0 0%,
        #f5c64e 40%,
        #bd791f 78%,
        #70400f 100%
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px #57370d;

    filter: drop-shadow(0 6px 2px rgba(0, 0, 0, 0.9));
}

/* Letra O independiente para poder personalizarla */
.letra-o {
    display: inline-block;
}

/* eres? */
.titulo-inferior {
    font-size: clamp(2.3rem, 6vw, 5rem);
    font-weight: bold;
    letter-spacing: 0.06em;
    margin-top: -0.03em;
    text-shadow:
        0 4px 5px #000,
        0 0 18px rgba(0, 0, 0, 0.8);
}

/* Movimiento suave del humo */
@keyframes movimiento-humo {
    from {
        transform: translateX(-2%) scale(1);
    }

    to {
        transform: translateX(2%) scale(1.08);
    }
}

/* Ajustes en pantallas pequeñas */
@media (max-width: 480px) {
    .logo {
        letter-spacing: -0.055em;
        -webkit-text-stroke: 0.5px #57370d;
    }

    .titulo-superior {
        line-height: 1.2;
        margin-bottom: 8px;
    }
}

/* =========================================================
   Carteles de acceso de la página principal
   Se compensa el margen transparente de cada PNG para que
   los dos carteles tengan la misma altura visual.
   ========================================================= */

.carteles-inicio {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(44px, 6vw, 90px);
    width: min(100%, 1100px);
    margin: clamp(60px, 9vh, 120px) auto 0;
}

.opcion-cartel {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    width: min(100%, 430px);
    min-width: 0;
}

.enlace-cartel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    height: auto;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 180ms ease, filter 180ms ease;
}

/* El PNG izquierdo tiene más margen transparente que el derecho.
   Su lienzo se muestra un 13,1 % más alto para igualar el tamaño
   visible del papel, sin estirar ni recortar el dibujo. */
.opcion-cartel:first-child .enlace-cartel img {
    height: clamp(475px, 65.65vh, 611px);
}

.opcion-cartel:last-child .enlace-cartel img {
    height: clamp(420px, 58vh, 540px);
}

.enlace-cartel img {
    display: block;
    width: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.58));
}

.enlace-cartel:hover {
    transform: translateY(-5px) scale(1.015);
    filter: brightness(1.06);
}

.enlace-cartel:focus-visible {
    outline: 3px solid #f5c64e;
    outline-offset: 6px;
}

/* En tablet y móvil se apilan los carteles. El ancho disponible
   limita la altura para que ninguna imagen se salga de pantalla. */
@media (max-width: 960px) {
    .portada {
        padding: 22px 16px 44px;
    }

    .carteles-inicio {
        flex-direction: column;
        gap: 30px;
        width: 100%;
        margin-top: 28px;
    }

    .opcion-cartel {
        width: 100%;
    }

    .opcion-cartel:first-child .enlace-cartel img {
        height: min(61.1vh, 498px, calc((100vw - 32px) / 0.805));
    }

    .opcion-cartel:last-child .enlace-cartel img {
        height: min(54vh, 440px, calc((100vw - 32px) / 0.911));
    }
}

/* En pantallas de escritorio especialmente bajas, reducimos ambos
   carteles conservando la misma proporción de tamaño visible. */
@media (max-height: 650px) and (min-width: 961px) {
    .portada {
        padding-bottom: 36px;
    }

    .opcion-cartel:first-child .enlace-cartel img {
        height: min(50.94vh, 441px);
    }

    .opcion-cartel:last-child .enlace-cartel img {
        height: min(45vh, 390px);
    }
}
/* Desplazar el cartel izquierdo */
@media (min-width: 961px) {
    .opcion-cartel:first-child {
        transform: translateX(-110px);
    }
}
/* BOTÓN DE MÚSICA CON ICONO DE ALTAVOZ */
.reproductor-musica {
    position: fixed;
    right: 20px;
    bottom: 18px;
    z-index: 100;
}

.boton-control-musica {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;

    color: #f5c64e;
    background: rgba(16, 16, 20, 0.94);
    border: 2px solid #c69a45;
    border-radius: 50%;

    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
    transition: transform 180ms ease, background 180ms ease;
}

.boton-control-musica:hover {
    transform: scale(1.1);
    background: #30251a;
}

.boton-control-musica svg {
    width: 25px;
    height: 25px;
}

.boton-control-musica.silenciada .ondas {
    display: none;
}

.boton-control-musica .tachado {
    display: none;
}

.boton-control-musica.silenciada .tachado {
    display: block;
}

.boton-control-musica:focus-visible {
    outline: 3px solid #f5c64e;
    outline-offset: 4px;
}

@media (max-width: 480px) {
    .reproductor-musica {
        right: 12px;
        bottom: 12px;
    }
}







/* =========================================================
   Pantalla de entrada (solo si el navegador bloquea el sonido)
   ========================================================= */
.pantalla-entrada {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: 0;
    cursor: pointer;
    color: #f5c64e;
    font-family: Georgia, "Times New Roman", serif;
    background: rgba(8, 8, 12, 0.82);
    backdrop-filter: blur(3px);
}

.pantalla-entrada[hidden] {
    display: none;
}

.pantalla-entrada-texto {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    text-shadow: 0 4px 10px #000;
    animation: latido-entrada 1.6s ease-in-out infinite;
}

.pantalla-entrada-subtexto {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #fff;
    opacity: 0.8;
}

.pantalla-entrada:focus-visible {
    outline: 3px solid #f5c64e;
    outline-offset: -12px;
}

@keyframes latido-entrada {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}


/* =========================================================
   RECUADROS DESCRIPTIVOS BAJO CADA CARTEL
   Papel amarillo envejecido con doble borde dorado
   ========================================================= */
.descripcion-cartel {
    position: relative;
    width: min(100%, 430px);
    min-height: 158px;
    padding: 24px 26px;
    overflow: hidden;
    color: #4b351d;
    text-align: center;
    background:
        radial-gradient(ellipse at 14% 18%, rgba(255, 250, 218, 0.58), transparent 34%),
        radial-gradient(ellipse at 88% 82%, rgba(151, 105, 42, 0.15), transparent 38%),
        linear-gradient(135deg, #f8edbd 0%, #ead18e 48%, #f5e5ad 100%);
    border: 2px solid #b88936;
    border-radius: 12px;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        inset 0 0 18px rgba(126, 83, 27, 0.12);
}

.descripcion-cartel::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(151, 105, 39, 0.58);
    border-radius: 6px;
    pointer-events: none;
}

.descripcion-cartel h2 {
    position: relative;
    margin: 0 0 10px;
    color: #713c20;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 250, 221, 0.72);
}

.descripcion-cartel p {
    position: relative;
    margin: 0;
    color: #4d3b25;
    font-size: 14px;
    line-height: 1.55;
}

@media (max-width: 960px) {
    .opcion-cartel {
        width: 100%;
    }

    .descripcion-cartel {
        width: min(100%, 430px);
        min-height: 0;
        padding: 22px 24px;
    }
}

@media (max-width: 480px) {
    .descripcion-cartel {
        padding: 20px 19px;
        border-radius: 10px;
    }

    .descripcion-cartel h2 {
        font-size: 15px;
    }

    .descripcion-cartel p {
        font-size: 13px;
    }
}
/* Bajar el recuadro descriptivo de QUIZ */
@media (min-width: 961px) {
    .descripcion-quiz {
        transform: translateY(35px);
    }
}