
@font-face {
  font-family: 'Tall Film';
  src: url(./fonts/TallFilm.ttf);
}

:root {
  --color-env: #191970;
  --color-env2: color-mix(in srgb, var(--color-env), black 3%);
  --color-flap: color-mix(in srgb, var(--color-env), black 20%);
  --color-bg: white;
  --env-width: 600px;
  --env-height: calc(var(--env-width) * 0.6);
  --env-border-radius: 6px;
  --cor-texto: #3c2415;
  --margem-icons: 2rem;
}

@media screen and (max-width: 768px) {
  :root {
    --env-width: 90vw;
  }
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--color-bg);
  font-family: 'Tall Film', sans-serif;
  color: var(--cor-texto);
}

body.bloquear-rotacao{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: #fff;
  z-index: 99999;
}

#envelope {
  position: relative;
  width: var(--env-width);
  height: var(--env-height);
  border-bottom-left-radius: var(--env-border-radius);
  border-bottom-right-radius: var(--env-border-radius);
  margin-left: auto;
  margin-right: auto;
  background-color: var(--color-flap);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: opacity 2s 1s ease,
              visibility 0s 3s;
  cursor: pointer;
}

#envelope.open {
  opacity: 0;
  visibility: hidden;
}

.front {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 3;
}

.flap {
  border-left: calc(var(--env-width) / 2) solid transparent;
  border-right: calc(var(--env-width) / 2) solid transparent;
  border-bottom: calc(calc(var(--env-height) / 2) - 8px) solid transparent;
  border-top: calc(calc(var(--env-height) / 2) + 8px) solid var(--color-flap);
  transform-origin: top;
  pointer-events: none;
}

.pocket {
  border-left: calc(var(--env-width) / 2) solid var(--color-env);
  border-right: calc(var(--env-width) / 2) solid var(--color-env);
  border-bottom: calc(var(--env-height) / 2) solid var(--color-env2);
  border-top: calc(var(--env-height) / 2) solid transparent;
  border-bottom-left-radius: var(--env-border-radius);
  border-bottom-right-radius: var(--env-border-radius);
}

.letter {
  position: relative;
  background-color: #fff;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  height: 90%;
  top: 5%;
  border-radius: var(--env-border-radius);
  box-shadow: 0 2px 26px rgba(0, 0, 0, 0.12);
}

.letter:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-image: linear-gradient(180deg,
      rgba(255, 255, 255, 0) 25%,
      rgba(215, 227, 239, 0.7) 55%,
      rgba(215, 227, 239, 1) 100%);
}

.open .flap {
  transform: rotateX(180deg);
  transition: transform 1.5s ease, z-index 0.6s;
  z-index: 1;
}

.close .flap {
  transform: rotateX(0deg);
  transition: transform 1s 1s ease, z-index 1s;
  z-index: 5;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

body.bloquear-rotacao .container {
  display: none;
}

.texto-info {
  position: fixed;
  bottom: 0;
  right: 0;
  padding-inline-end: 1rem;
  padding-block-end: 0.5rem;
  font-size: 2em;
  transition: opacity 2s ease;
  text-shadow: 0px 0px 1px white;
  z-index: 10;
}

.texto-info.hide {
  opacity: 0;
}

.convite {
  position: absolute;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  opacity: 1;
  transition: opacity 2s 2s;
}

.convite.hide {
  opacity: 0;
}

.convite_fundo {
  position: absolute;
  width: fit-content;

}

.convite_fundo > img {
  object-fit: cover;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.icons {
  position: absolute;
  bottom: 6vh;
  display: inline-flex;
  justify-content: center;
  text-align: center;
  margin-inline: var(--margem-icons);
  width: calc(100% - calc(var(--margem-icons) * 2));
  left: 0;
  gap: var(--margem-icons);
}

.icon {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  cursor: pointer;
  transition: all 200ms ease-in-out;
  text-decoration: none;
  color: var(--cor-texto);
}

.icon:hover {
  transform: scale(1.1);
}


.icon > img {
  width: 100%;
}

.icon > span {
  font-size: 1.5em;
}

@media (width <= 730px) {
.icons {
    --margem-icons: 1rem
  }
  .icon > span {
    font-size: 1em;
  }
}

@media (width <=600px) and (orientation: landscape) {
  .icons {
      --margem-icons: 1rem
    }
  .icon > span {
    font-size: 0.7em;
  }
}