@font-face {
    font-family: "DemosNextPro";
    src: url("fonts/DemosNextPro/DemosNextPro-Medium.ttf") format("truetype");
}

@font-face {
    font-family: "DemosNextPro";
    font-weight: 400;
    src: url("fonts/DemosNextPro/DemosNextPro-Medium.ttf") format("truetype");
}

@font-face {
    font-family: "DemosNextPro";
    font-weight: 400;
    font-style: italic;
    src: url("fonts/DemosNextPro/DemosNextPro-MediumItalic.ttf") format("truetype");
}

/* PREVIEW PLAY */

.preview-overlay {
    position: absolute;
    top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    z-index: 3;
    transition: transform ease-in-out 1.5s, opacity ease-in-out 0.5s;
    width: 1148px;
    height: 851px;
}

.preview-overlay:hover {
    cursor: pointer;
}

.preview--play {
    width: 346px;
    height: 346px;
    background-color: #ffffff;
    border-radius: 100%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 100px #000;
    padding-left: 50px;
    animation: pulse 2s infinite ease-in-out;
}

.preview--play:hover {
    cursor: pointer;
}

/* EPILOGUE OVERLAY */

.epilogue-overlay {
    position: absolute;
    top: 160px;
    width: 1148px;
    height: auto;
    opacity: 0;
}

.epilogue-overlay p {
    font-family: "DemosNextPro", serif;
    font-size: 50px;
    font-weight: 400;
    font-style: normal;
    margin: 0;
    color: #004899;
    text-align: center;
}


p.en {
    font-style: italic;
}

/* HANDLES */

.handles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 40px;
    flex-grow: 1;
    z-index: 10;
    position: relative;
}

.handles--repeat {
    width: 100px;
    height: 100px;
    border-radius: 100px;
    background-color: #004899;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: all ease-in-out 0.2s;
}

#handlesRepeatAfterFinish {
    display: none;
    pointer-events: auto;
    position: absolute;
}


.handles--repeat:hover {
    cursor: pointer;
}

.handles--map {
    width: 100px;
    height: 100px;
    border-radius: 100px;
    background-color: #004899;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;

}

.handles--memory {
    width: 100px;
    height: 100px;
    border-radius: 100px;
    background-color: #004899;
    border: none;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 40px;
    bottom: 34px;
    z-index: -1;
}

.handles--memory svg {
    max-width: 20px;
    height: auto;
    margin-top: -10px;
    margin-left: 7px;
    margin-bottom: 3px;
}

.handles--memory svg path {
    stroke: #fff;
}

.handles--memory span {
    color: #ffffff;
    font-family: "DemosNextPro", serif;
    font-size: 20px;
}

h1 {
    font-family: "DemosNextPro", serif;
    color: #4E4E4E;
    font-size: 80px;
    font-weight: 400;
    font-style: normal;
    margin: 0;
    transition: opacity ease-in-out 1s;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: rgb(255, 253, 237);
}

svg {
    display: block;
}

.wrapper {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-direction: column;
    background: #FFFDED;
    position: relative;
    transition: all ease-in-out 1s;
    background: url("assets/firework.gif");
    background-size: contain;

}

.curtain {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #FFFDED;
    /*transition: all ease-in-out 1s;*/
}

/* GAME */

.game-shuffle-overlay {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 0;
    opacity: 0;
    /*display: none;*/
    align-items: center;
    flex-direction: column;
    transition: opacity ease-in-out 1s;
}

.game-shuffle-overlay .game__card {
    width: 257px;
    height: 257px;
    transition: all ease-in-out 0.8s;
}

.game-shuffle-overlay .game__card#one {
    position: absolute;
    left: 0;
    top: 0;
}

.game-shuffle-overlay .game__card#two {
    position: absolute;
    left: 297px;
    top: 0;
}

.game-shuffle-overlay .game__card#three {
    position: absolute;
    left: 594px;
    top: 0;
}

.game-shuffle-overlay .game__card#four {
    position: absolute;
    left: 891px;
    top: 0;
}

.game-shuffle-overlay .game__card#five {
    position: absolute;
    left: 0;
    top: 297px;
}

.game-shuffle-overlay .game__card#six {
    position: absolute;
    left: 297px;
    top: 297px;
}

.game-shuffle-overlay .game__card#seven {
    position: absolute;
    left: 594px;
    top: 297px;
}

.game-shuffle-overlay .game__card#eight {
    position: absolute;
    left: 891px;
    top: 297px;
}

.game-shuffle-overlay .game__card#nine {
    position: absolute;
    left: 0;
    top: 594px;
}

.game-shuffle-overlay .game__card#ten {
    position: absolute;
    left: 297px;
    top: 594px;
}

.game-shuffle-overlay .game__card#eleven {
    position: absolute;
    left: 594px;
    top: 594px;
}

.game-shuffle-overlay .game__card#twelve {
    position: absolute;
    left: 891px;
    top: 594px;
}

.game {
    display: flex;
    align-items: center;
    flex-direction: column;
    transition: opacity ease-in-out 1s;
}

.game__cards {
    width: 1148px;
    margin: 60px auto auto auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 257px;
    grid-gap: 40px;
    position: relative;
}

.game__cards.no-event {
    pointer-events: none;
}

.game__card {
    position: relative;
    cursor: pointer;
    perspective: 700px;
}

.game__card.has-match {
    animation: pulse-single ease-in-out 1s 0.2s;
}

.game__card.flipped, .game__card.has-match {
    pointer-events: none;
}

.game__card.flipped .game__back-card, .game__card.has-match .game__back-card {
    transform: rotateY(180deg);
}

.game__card.flipped .game__front-card, .game__card.has-match .game__front-card {
    transform: rotateY(360deg);
}

.game__back-card, .game__front-card {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transition: transform 400ms;
    border: 1px solid #004899;
}

.game__back-card {
    z-index: 1;
    background: #004899 url("assets/card-bg.svg") no-repeat center;
}

.game__front-card {
    transform: rotateY(180deg);
    background: #ffffff;
}


/* ANIMATIONS */

@keyframes pulse {
    0% {
        transform: scale(1); /* scaling to 0 */
    }
    50% {
        transform: scale(1.1); /* increasing the size */
    }
    100% {
        transform: scale(1); /* seeting back to initial size */
    }
}

@keyframes pulse-single {
    0% {
        transform: scale(1); /* scaling to 0 */
    }
    50% {
        transform: scale(1.1); /* increasing the size */
    }
    100% {
        transform: scale(1); /* seeting back to initial size */
    }
}


/*  FIREWORK */

#firework {
    display: none;
}

/* VIDEO */

.video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -1;
    opacity: 0;
    transition: opacity ease-in-out 1s;
}

.curtainVideo {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: transparent;
    transition: background-color ease-in-out 1s;
}



