@import url('../fonts/stylesheet.css');

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: rgb(247, 247, 247);
    position: relative;
    z-index: 0;
}

.christmas-card {
    position: relative;
    z-index: -1;
    border-bottom: 1px solid #FFF;
}

.christmas-card-full img {
    display: block;
    width: 100%;
}

.christmas-card-full figure {
    position: relative;
}

.christmas-card-full figure img {
    opacity: 0;
}

.christmas-card-full figure img:not(:first-child) {
    transition: all 0.3s ease-in-out;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
}

.christmas-card-full figure img:nth-child(1) {
    opacity: 1;
}

.christmas-card-half {
    display: flex;
}

.christmas-card-half div {
    flex-basis: 50%;
    flex-grow: 1;
    flex-shrink: 1;
    display: block;
    position: relative;
    overflow: hidden;
}

.christmas-card-half img {
    width: 100%;
    display: block;
}

.christmas-card-half div:first-child {
    border-right: 1px solid white;
}

div.overlay {
    cursor: pointer;
}

div.overlay .transparant {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/christmas-2017-overlay.png') no-repeat center center;
    background-size: cover;
    z-index: 1;
    opacity: 0;
    transition: all 650ms ease-in-out;
}

div.overlay:hover .transparant, .transparant:hover {
    opacity: 1 !important;
}

nav a {
    position: fixed;
    right: 0;
    top: 0;
    display: block;
    min-width: 50px;
    height: 50px;
    padding: 10px 10px 10px 30px;
    box-sizing: border-box;
    background-color: rgba(255,255,255,0.7);
    z-index: 2;
    transition: all 500ms ease-in;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    color: #4cb2ff;
    text-decoration: none;
    text-transform: uppercase;
    border-bottom-left-radius: 5px;
}

nav a::after {
    background: url('../images/icons8-snowflake-96.png') no-repeat center center;
    animation: snowflake 5s linear 0;
    animation-iteration-count: infinite;
    background-size: 30px 30px;
    background-position: 10px center;
    width: 50px;
    height: 50px;
    position: absolute;
    left: 0;
    top: 0;
    content: '';
    transition: all 500ms ease-in;
}

nav a span {
    opacity: 0;
    font-size: 0px;
    transition: all 500ms ease-in;
}

nav a:hover {
    background-color: #FFF;
}

nav a:hover span {
    display: block;
    font-size: 1rem;
    opacity: 1;
    padding-left: 20px;
}

nav a:hover::after {
    animation-play-state: paused;
    transform: rotate(1turn);
}

@keyframes snowflake {
    0% {
    }
    100% {
        transform: rotate(1turn);
    }
}

h2 {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 0.5rem;
    /*
    display: flex;
    align-items: baseline;
    */
    font-weight: 400;
    font-size: 0.8rem;
    color: #fff;
    z-index: 5;
}

canvas{
    position:fixed;
    z-index: 1;
    top:0;
    left:0;
    pointer-events: none;
}

footer {
    padding: 1rem 0.5rem;
    background: rgb(30, 30, 30);
    color: #fff;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer a {
    color: rgb(255, 244, 229);
}

/* iPads (portrait) ----------- */
@media only screen and (max-device-width : 1000px) 
{

    .christmas-card-half {
        display: block;
    }
    
    .christmas-card-half div {
        flex-basis: 100%;
    }
    
    .christmas-card-half div:first-child {
        border-right: none;
        border-bottom: 1px solid #fff;
    }
}

/* iPads (portrait) ----------- */
@media only screen and (max-device-width : 700px) 
{
    :root {
        font-size: 14px;
        line-height: 18px;
    }
}

/* ---------------------- */

#card-2022::before {
    z-index: 1;
    content:"";
    position:absolute;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background-image: radial-gradient(25% 25% at 50% 63%, rgba(241, 241, 13, 0.947) 0%, rgba(255, 232, 24, 0.5) 14%, rgba(255, 228, 53, 0) 70%);
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
/* ---------------------- */

#card-2023 .stars {
    /* display: none; */
    position: absolute;
    z-index: 1  ;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: url('../images/christmas-2023-stars.png') no-repeat center 70%;
    background-size: 100% auto;
    animation: fadeHalfInOut 3s ease-in-out infinite, floatUpDown 12s ease-in-out infinite, show 5s linear forwards;
}

#card-2023 .mask-star {
    position: absolute;
    /* z-index: 2; */
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    animation: hide 3s ease-in-out forwards;
}

#card-2023 img {
    mask: url('../images/ster.svg') center/contain no-repeat;
    z-index: 1;
}

#card-2023::before{
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: url('../images/christmas-2023-starless.jpg') no-repeat center center / cover;
}

#card-2023 .rotating-star {
    display: block;
    position: absolute;
    margin: 0 auto;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    fill: rgba(239, 181, 80, 0.9);
    animation: rotate 2s ease-in, hide 2s ease-in-out forwards;
}

@keyframes floatUpDown {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1rem);
        background-size: 110% auto;
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes fadeHalfInOut {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes hide {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes show {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


#card-2024, #card-2024 * {
    box-sizing: border-box;
}



:root {
    --countdown-color: rgb(255, 238, 238);
}

#card-2024 #countdown {
    font-family: "Technology", monospace;
    position: absolute;
    bottom: 3%;
    left: 0;
    right: 0;
    width: 100vw;
    display: flex;
    justify-content: center;
    transform: scale(0.6);
}



@media only screen and (max-width : 800px) 
{
    #card-2024 #countdown {
        transform-origin: right bottom;
        transform: scale(0.4);
        justify-content: flex-end;
        left: unset;
        margin-right: 1rem;
    }

    #card-2024 h2 {
        padding-right: 40%;
    }
}

@media only screen and (max-width : 600px) 
{
    #card-2024 #countdown {
        transform-origin: right bottom;
        transform: scale(0.3);
        justify-content: flex-end;
        left: unset;
        margin-right: 1rem;
    }
}

#card-2024 #countdown .digits::before {
    content: 'Matteo born';
    position: absolute;
    font-size: 20px;
    line-height: 1;
    top: -32px;
    left: -5px;
    background-color: var(--countdown-color);
    color: black;
    padding: 5px 10px;
}

#card-2024 #countdown .digits {
    box-sizing: border-box;
    position: relative;
    background-color: hsla(0, 0%, 12%, 0.95);
    color: var(--countdown-color);
    border: 5px solid var(--countdown-color);
    text-align: center;
    font-size: 5rem;
    line-height: 5rem;
    padding: 1rem 1rem 0rem 1rem;
    text-shadow: 0 0 20px var(--countdown-color),  0 0 20px rgba(230, 10, 10, 0);
    box-shadow: 0 0 20px var(--countdown-color),  0 0 20px rgba(230, 10, 10, 0);
    /* min-width: 390px; */
    display: flex;
    justify-content: space-between;
}

#card-2024 #countdown .digits span {
    position: relative;
    /* min-width: 1em; */
    text-align: right;
    display: block;
}

/* #card-2024 #countdown .digits span::after {
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    font-size: 25px;
    line-height: 1;
    text-align: right;
    
} */

/* span.days::after {
    content: 'days';
}

span.hours::after {
    content: 'hours';
}

span.minutes::after {
    content: 'min.';
}

span.seconds::after {
    content: 'sec.';
} */