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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

body {
    -webkit-tap-highlight-color: transparent;
}

#convite {
    position: relative;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
}


/* =========================================================
   TELAS
========================================================= */

.tela {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 1;
}

.tela.ativa {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.imagem-tela {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    user-select: none;
    -webkit-user-drag: none;
}


/* =========================================================
   LACRE
========================================================= */

.area-lacre {
    position: absolute;

    width: 50%;
    height: 42%;

    left: 25%;
    top: 29%;

    border: none;
    background: transparent;

    cursor: pointer;

    z-index: 20;
}


/* =========================================================
   BOTÕES
========================================================= */

.botao-interativo {
    position: absolute;

    border: none;
    background: transparent;

    padding: 0;

    cursor: pointer;

    z-index: 50;

    border-radius: 50%;

    -webkit-tap-highlight-color: transparent;

    transition: transform .2s ease;
}

.botao-interativo:active {
    transform: scale(.9);
}

.botao-presentes {
    width: 31%;
    height: 30%;

    left: 3%;
    bottom: 8%;
}

.botao-local {
    width: 31%;
    height: 30%;

    left: 34.5%;
    bottom: 8%;
}

.botao-confirmar {
    width: 31%;
    height: 30%;

    right: 3%;
    bottom: 8%;
}


/* =========================================================
   VOLTAR
========================================================= */

.botao-voltar {
    position: absolute;

    top: 18px;
    left: 18px;

    width: 45px;
    height: 45px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,.88);

    color: #8b4b9d;

    font-size: 28px;

    cursor: pointer;

    z-index: 100;
}


/* =========================================================
   TRANSIÇÃO
========================================================= */

#transicao {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 9999;

    opacity: 0;
    visibility: hidden;

    overflow: hidden;
}


/* =========================================================
   LUZ DA ÁGUA
========================================================= */

.luz-agua {
    position: absolute;

    width: 160%;
    height: 100%;

    left: -30%;
    top: 0;

    background:
        linear-gradient(
            105deg,
            transparent 15%,
            rgba(255,255,255,.04) 30%,
            rgba(255,255,255,.48) 48%,
            rgba(255,255,255,.08) 62%,
            transparent 80%
        );

    filter: blur(15px);

    opacity: 0;
}


/* =========================================================
   ONDAS
========================================================= */

.onda {
    position: absolute;

    width: 170%;
    height: 45%;

    left: -35%;

    border-radius: 50%;

    opacity: 0;
}

.onda-cima {
    top: -28%;
}

.onda-baixo {
    bottom: -28%;
}


/* =========================================================
   BOLHAS
========================================================= */

.bolha {
    position: absolute;

    bottom: -40px;

    border-radius: 50%;

    border: 1.5px solid rgba(255,255,255,.8);

    background:
        radial-gradient(
            circle at 30% 25%,
            rgba(255,255,255,.9),
            rgba(255,255,255,.12) 55%,
            transparent 72%
        );

    box-shadow:
        inset 1px 1px 3px rgba(255,255,255,.7);

    opacity: 0;
}

.bolha1 {
    width: 12px;
    height: 12px;
    left: 8%;
}

.bolha2 {
    width: 7px;
    height: 7px;
    left: 22%;
}

.bolha3 {
    width: 18px;
    height: 18px;
    left: 38%;
}

.bolha4 {
    width: 9px;
    height: 9px;
    left: 56%;
}

.bolha5 {
    width: 15px;
    height: 15px;
    left: 73%;
}

.bolha6 {
    width: 8px;
    height: 8px;
    left: 88%;
}


/* =========================================================
   BRILHOS
========================================================= */

.brilho {
    position: absolute;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: white;

    box-shadow:
        0 0 8px white,
        0 0 18px rgba(255,255,255,.9);

    opacity: 0;
}


/* =========================================================
   1 — ABERTURA DO MAR
   PRINCIPAL
========================================================= */

#transicao.tipo1 {
    visibility: visible;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,.25),
            rgba(135,224,239,.18),
            transparent 75%
        );

    animation:
        primeiraTransicao
        1.1s
        ease-in-out
        forwards;
}

#transicao.tipo1 .onda-cima {
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.75),
            rgba(145,229,242,.25),
            transparent
        );

    animation:
        ondaCima
        1.1s
        ease-in-out
        forwards;
}

#transicao.tipo1 .onda-baixo {
    background:
        linear-gradient(
            0deg,
            rgba(255,255,255,.65),
            rgba(135,220,238,.2),
            transparent
        );

    animation:
        ondaBaixo
        1.1s
        ease-in-out
        forwards;
}

#transicao.tipo1 .luz-agua {
    animation:
        luzPassando
        1.1s
        ease-in-out
        forwards;
}

#transicao.tipo1 .bolha {
    animation:
        bolhaSubindo
        1.1s
        ease-out
        forwards;
}

@keyframes primeiraTransicao {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    72% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes ondaCima {
    0% {
        transform:
            translateX(-90%)
            rotate(-8deg);
        opacity: 0;
    }

    25% {
        opacity: .8;
    }

    100% {
        transform:
            translateX(90%)
            rotate(-8deg);
        opacity: 0;
    }
}

@keyframes ondaBaixo {
    0% {
        transform:
            translateX(90%)
            rotate(8deg);
        opacity: 0;
    }

    25% {
        opacity: .7;
    }

    100% {
        transform:
            translateX(-90%)
            rotate(8deg);
        opacity: 0;
    }
}

@keyframes luzPassando {
    0% {
        transform: translateX(-55%);
        opacity: 0;
    }

    30% {
        opacity: .7;
    }

    100% {
        transform: translateX(55%);
        opacity: 0;
    }
}

@keyframes bolhaSubindo {
    0% {
        transform:
            translateY(0)
            scale(.35);
        opacity: 0;
    }

    20% {
        opacity: .8;
    }

    100% {
        transform:
            translateY(-110vh)
            translateX(20px)
            scale(1.15);
        opacity: 0;
    }
}


/* =========================================================
   2 — BRILHO SUAVE
========================================================= */

#transicao.tipo2 {
    visibility: visible;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,.22),
            rgba(220,244,248,.12),
            transparent 70%
        );

    animation:
        brilhoSuave
        1s
        ease-in-out
        forwards;
}

#transicao.tipo2 .luz-agua {
    animation:
        luzHorizontal
        1s
        ease-in-out
        forwards;
}

#transicao.tipo2 .brilho {
    animation:
        pequenosBrilhos
        1s
        ease-out
        forwards;
}

@keyframes brilhoSuave {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes luzHorizontal {
    0% {
        transform:
            translateX(-65%)
            rotate(-7deg);
        opacity: 0;
    }

    35% {
        opacity: .7;
    }

    100% {
        transform:
            translateX(65%)
            rotate(-7deg);
        opacity: 0;
    }
}

@keyframes pequenosBrilhos {
    0% {
        transform: scale(.1);
        opacity: 0;
    }

    35% {
        transform: scale(2);
        opacity: .9;
    }

    100% {
        transform: scale(.2);
        opacity: 0;
    }
}


/* =========================================================
   3 — BOLHAS DELICADAS
========================================================= */

#transicao.tipo3 {
    visibility: visible;

    background:
        radial-gradient(
            circle at center,
            rgba(180,239,246,.16),
            transparent 70%
        );

    animation:
        bolhasDelicadas
        1.05s
        ease-out
        forwards;
}

#transicao.tipo3 .bolha {
    animation:
        bolhasSubindo
        1.05s
        ease-out
        forwards;
}

@keyframes bolhasDelicadas {
    0% {
        opacity: 0;
    }

    25% {
        opacity: 1;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes bolhasSubindo {
    0% {
        transform:
            translateY(15vh)
            scale(.25);
        opacity: 0;
    }

    20% {
        opacity: .8;
    }

    100% {
        transform:
            translateY(-115vh)
            translateX(25px)
            scale(1.2);
        opacity: 0;
    }
}


/* =========================================================
   4 — ENTRADA NA QUINTA
   SEM TELA AZUL
========================================================= */

#transicao.tipo4 {
    visibility: visible;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,.28),
            rgba(180,235,242,.12),
            transparent 72%
        );

    animation:
        entradaQuinta
        1.05s
        ease-in-out
        forwards;
}

#transicao.tipo4 .bolha {
    animation:
        bolhasQuinta
        1.05s
        ease-out
        forwards;
}

#transicao.tipo4 .luz-agua {
    animation:
        luzQuinta
        1.05s
        ease-in-out
        forwards;
}

@keyframes entradaQuinta {
    0% {
        opacity: 0;
        transform: scale(.96);
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(1.04);
    }
}

@keyframes bolhasQuinta {
    0% {
        transform:
            translateY(12vh)
            scale(.3);
        opacity: 0;
    }

    25% {
        opacity: .8;
    }

    100% {
        transform:
            translateY(-110vh)
            translateX(-15px)
            scale(1.1);
        opacity: 0;
    }
}

@keyframes luzQuinta {
    0% {
        transform: translateX(-60%);
        opacity: 0;
    }

    40% {
        opacity: .55;
    }

    100% {
        transform: translateX(60%);
        opacity: 0;
    }
}


/* =========================================================
   5 — VOLTANDO DA QUINTA
========================================================= */

#transicao.tipo5 {
    visibility: visible;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,.2),
            rgba(210,238,242,.08),
            transparent 72%
        );

    animation:
        retornoQuarta
        1s
        ease-in-out
        forwards;
}

#transicao.tipo5 .brilho {
    animation:
        brilhoRetorno
        .9s
        ease-out
        forwards;
}

#transicao.tipo5 .bolha {
    animation:
        bolhasRetorno
        1s
        ease-out
        forwards;
}

@keyframes retornoQuarta {
    0% {
        opacity: 0;
        transform: scale(1.05);
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(.98);
    }
}

@keyframes brilhoRetorno {
    0% {
        transform: scale(2);
        opacity: 0;
    }

    35% {
        transform: scale(1);
        opacity: .8;
    }

    100% {
        transform: scale(.2);
        opacity: 0;
    }
}

@keyframes bolhasRetorno {
    0% {
        transform:
            translateY(5vh)
            scale(.3);
        opacity: 0;
    }

    25% {
        opacity: .7;
    }

    100% {
        transform:
            translateY(-100vh)
            scale(1.1);
        opacity: 0;
    }
}


/* =========================================================
   AVISO
========================================================= */

.aviso {
    position: fixed;
    inset: 0;

    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(20,50,80,.4);

    backdrop-filter: blur(7px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.aviso.aberto {
    opacity: 1;
    visibility: visible;
}

.aviso-caixa {
    width: min(90vw,350px);

    padding: 28px 22px;

    text-align: center;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            #fffaff,
            #f8ddf5
        );

    box-shadow:
        0 20px 60px rgba(0,0,0,.25);
}

.aviso-coracao {
    font-size: 40px;
    margin-bottom: 10px;
}

.aviso-caixa p {
    color: #70427d;

    font-size: 16px;

    line-height: 1.5;

    margin-bottom: 20px;
}

#fecharAviso {
    border: none;

    border-radius: 20px;

    padding: 10px 25px;

    background: #c477bd;

    color: white;

    font-weight: bold;
}
