/* =========================================================
   GLUB — CAPA
   ========================================================= */

#capa-tela {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: none;
    z-index: 100;
    background: #e5edf6;
}

.capa-fundo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.capa-vogais {
    position: absolute;
    inset: 0;
}

.capa-vogal {
    position: absolute;
    width: calc(147 / 1280 * 100%);
    height: calc(214 / 720 * 100%);
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 2;
    touch-action: manipulation;
}

.capa-vogal-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.capa-vogal:hover {
    filter: brightness(1.04);
}

.capa-vogal:active {
    transform: translate(-50%, -50%) scale(.97);
}

.capa-vogal:focus {
    outline: none;
}

.capa-boca {
    position: absolute;
    width: auto;
    height: auto;
    max-width: 12%;
    transform: translate(-50%, -50%) scaleY(.72);
    transform-origin: center center;
    z-index: 5;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0;
}

/* A boca usada é a própria referência articulatória da vogal.
   A animação apenas dá movimento de abertura/fechamento à imagem,
   sem substituir a configuração da vogal por uma boca genérica. */
.capa-boca-abrindo {
    animation: capaBocaAbrir 120ms ease-out forwards;
}

.capa-boca-aberta {
    opacity: 1;
    transform: translate(-50%, -50%) scaleY(1);
}

.capa-boca-fechando {
    animation: capaBocaFechar 180ms ease-in forwards;
}

@keyframes capaBocaAbrir {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scaleY(.72);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scaleY(1);
    }
}

@keyframes capaBocaFechar {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scaleY(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scaleY(.72);
    }
}


/* =========================================================
   NAVEGAÇÃO DA CAPA
   ========================================================= */

/* Botão para voltar ao Menu */
#capa-voltar-menu {
    position: absolute;
    left: 0.1%;
    bottom: 3.0%;

    width: 48px;
    height: 48px;

    margin: 0;
    padding: 0;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, .82);
    color: #174d7a;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, .25);

    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: bold;

    line-height: 48px;
    text-align: center;

    cursor: pointer;
    z-index: 20;

    transition:
        transform 180ms cubic-bezier(.2, .8, .2, 1),
        filter 180ms ease,
        box-shadow 180ms ease;

    touch-action: manipulation;
}

#capa-voltar-menu:hover {
    transform: scale(1.08);
    filter: brightness(1.06);

    box-shadow:
        0 5px 12px rgba(0, 0, 0, .30);
}

#capa-voltar-menu:active {
    transform: scale(.94);
    filter: brightness(.97);
}

#capa-voltar-menu:focus {
    outline: none;
}

#capa-voltar-menu:focus-visible {
    outline:
        3px solid rgba(23, 77, 122, .75);

    outline-offset: 3px;
}


/* =========================================================
   BOTÃO PROSSEGUIR — MESMO BOTÃO, ESPELHADO
   ========================================================= */

#capa-ir {
    position: absolute;

    right: 1.5%;
    bottom: 3.0%;

    left: auto;
    top: auto;

    width: 48px;
    height: 48px;

    margin: 0;
    padding: 0;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, .82);
    color: #174d7a;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, .25);

    font-family: Arial, sans-serif;
    font-size: 34px;
    font-weight: bold;

    line-height: 48px;
    text-align: center;

    cursor: pointer;
    z-index: 20;

    transition:
        transform 180ms cubic-bezier(.2, .8, .2, 1),
        filter 180ms ease,
        box-shadow 180ms ease;

    touch-action: manipulation;
}

/* Usa exatamente a mesma seta do botão de retorno,
   apenas espelhada horizontalmente. */
#capa-ir::after {
    content: "↩";

    display: block;
    line-height: 45px;

    transform: scaleX(-1);
}

#capa-ir:hover {
    transform: scale(1.08);
    filter: brightness(1.06);

    box-shadow:
        0 5px 12px rgba(0, 0, 0, .30);
}

#capa-ir:active {
    transform: scale(.94);
    filter: brightness(.97);
}

#capa-ir:focus {
    outline: none;
}

#capa-ir:focus-visible {
    outline:
        3px solid rgba(23, 77, 122, .75);

    outline-offset: 3px;
}
