* {
  box-sizing: border-box;
}

@font-face {
  font-family: 'arial-narrow';
  src: url("arialnarrow.woff2") format("woff2");
}

html {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  padding: 0.05px;
  height: 100dvh;
  transition: background-color 2s cubic-bezier(1, 1, 1, 1);
  background-color: rgb(255, 192, 253);
  overflow: hidden;
  font-family: 'arial-narrow', Arial, sans-serif;
  font-size: 3vw;
}

#container {
  position: relative;
  margin: 100px auto;
  margin-top: 32vh;
  width: 70vw;
  min-width: 350px;
  aspect-ratio: 4 / 1;
  perspective: 1000;
}

@media (max-width: 800px) {
  #container {
    width: 80vw;
    max-height: 100dvh;
    margin-top: 40vh;
  }
}

#card {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  position: relative;
  /* transition: 1.0s linear; */
  background-color: #ffffff;
  /* box-shadow: 2px 0px 4px rgba(0, 0, 0, 0.4); */
  text-align: center;
  justify-content: center;
  cursor: grab;
  transform-origin: center center;
  transform: perspective(2000px) translateZ(2000px) rotateX(10deg) rotateY(-60deg) rotateZ(5deg);
  transition: ease-in-out 0.5s;
}

#card::before,
#card::after {
  content: "";
  position: absolute;
  display: block;
  height: 10px;
  width: 50%;
  background-color: grey;
  filter: blur(10px);
  transform-style: flat;
  z-index: -1;
}

#card::before {
  transform: rotate(3deg);
  right: 10px;
  bottom: 5px;
}

#card::after {
  transform: rotate(-3deg);
  left: 10px;
  bottom: 5px;
}

.face {
  background-color: #ffffff;
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  font-family: 'arial-narrow', Arial, sans-serif;
  font-size: 2.5vw;

}

.face.back {
  transform: perspective(800px) rotateY(180deg);
  padding: 0 10px;
}

.face.front {
  font-size: 8vw;
  letter-spacing: 1.5vw;
}

.grabbing,
#card.grabbing {
  cursor: grabbing;
}

#card.grabbing {
  transition: unset;
}

/* COOKIE NOTICE */

#cookie-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: backdrop-filter 0.6s ease, opacity 0.6s ease;
  z-index: 9999;
}

.cookie-popup-hidden {
  background: none;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  pointer-events: none;
}

.popup-content {
  padding: 2vw;
  border-radius: 20px;
  background: none;
  width: 90%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.hidden {
  display: none;
}

p {
  margin: .75em 0 0 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2vw;
}

h2 {
  font-size: inherit;
  font-weight: normal;
  margin: 0;
}

button {
  padding: 20px 40px;
  margin-top: 1em;
  cursor: pointer;
  outline: none;
  border: none;
  border-radius: 10px;
  width: 100%;
  background: #FF0;
  color: #000;
  font-size: 3vw;
  font-family: 'arial-narrow', Arial, sans-serif;
  transition: transform .5s;
}

button:hover {
  transform: scale(1.02);
}

button.red {
  background: #F00;
}

input {
  outline: none;
  border-radius: 5px;
  border: 1px solid black;
  background: none;
  padding: 1em;
  font-size: 2.4vw;
  font-family: 'arial-narrow', Arial, sans-serif;
}

input::placeholder {
  color: #000;
}

p {
  font-size: 2.4vw;
}

a {
  color: #000;
}

form {
  margin-top: 1em;
}

form button {
  width: 50%;
}

.fall-out {
  animation: fallOut 0.6s forwards ease-in;
}

@keyframes fallOut {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(90deg);
    opacity: 1;
  }
}

.bounce-in {
  animation: bounceIn 0.8s forwards ease-out;
}

@keyframes bounceIn {
  0% {
    transform: translateY(-100vh) rotate(-60deg);
    opacity: 0;
  }

  50% {
    transform: translateY(40px) rotate(20deg);
    opacity: 1;
  }

  70% {
    transform: translateY(-20px) rotate(-10deg);
  }

  90% {
    transform: translateY(10px) rotate(5deg);
  }

  100% {
    transform: translateY(0);
  }
}

.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-30px) rotate(-5deg);
  }

  50% {
    transform: translateX(25px) rotate(5deg);
  }

  75% {
    transform: translateX(-15px) rotate(-10deg);
  }

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

@media (max-width: 800px) {

  body,
  button {
    font-size: 30px;
  }

  p,
  input,
  .face {
    font-size: 18px;
  }

  button {
    padding: 20px;
    margin-top: 20px;
    width: 80%;
    font-weight: normal;
  }


  p {
    margin: 10px 0 0 0;
  }

  .two-col {
    display: block;
  }

  input {
    display: block;
    width: 100%;
    padding: 20px;
    margin-bottom: 10px;
  }

  form {
    margin-top: 1em;
  }

  form button {
    width: 80%;
    font-family: 'arial-narrow', Arial, sans-serif;
  }
}
