@font-face {
  font-family: "otsikkofontti"; /* set name */
  src: url("PerfectoCalligraphyPersonalUse-V4dLz.ttf"); /* url of the font */
}

@font-face {
  font-family: "bodyfontti"; /* set name */
  src: url("DAYROM__.ttf"); /* url of the font */
}

body {
    background: #A1CBD5;
    font-family: bodyfontti;
    font-size: 13pt;
}

.card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 700px;
    background: white;
    transform-style: preserve-3d;
    transform: translate(-50%,-50%) perspective(2000px) scale(0.75);;
    /* Vasemmalle menevä varjo, perus varjo kun kiinni */
    box-shadow: inset 500px 0 50px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.2);
    transition: 1s;
}

.card:hover {
    transform: translate(-50%,-50%) perspective(2000px) scale(1) translateX(10%);
    /* Sisävarjo, perusvarjo kun auki */
    box-shadow: inset 10px 0 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.2);
}

#kuva {
    object-fit: contain;
    width: 100%;
}

#jakaja1 {
    width: 50%;
}

#jakaja2 {
    width: 50%;
    transform: scaleX(-1);
}

#otsikko {
    text-align: center;
    font-family: otsikkofontti;
    font-size: 64pt;
    margin-bottom: -20px;
}

p {
    margin: 15px 20px;
    text-align: center;
}

p.iso {
    font-size: 20pt;
}

.card .front {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-origin: left;
    transition: .7s;
    background: white;
}

.card .frontback {
    position: absolute;
    background: white;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: .5s;
    top: 0;
    transform: rotateY(180deg);
    /* Auennenn sivun varjo */ 
    box-shadow: 500px 0 50px rgba(0, 0, 0, 0.2) inset;
}

.frontcontent {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    flex-direction: column;
}

.card:hover .frontback {
    opacity: 1;
    transition: .5s;
}

.card:hover .front {
    transform: rotateY(-140deg);
}

#t {
    color: #777;
    margin-top: 25px;
}

.card .inside {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

#piiloon-heti {
    opacity: 0;
    text-align: right;
    font-size: 20px;
}

#piiloon-heti:hover {
    opacity: 0.2;
}
