/* fontes custom */
@font-face{
    font-family: 'Nightmare Pills';
    src: url(../resources/fonts/grave-font.ttf) format('truetype');
}

/* alinhamento de tudo */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000000; 

  font-family: 'Nightmare Pills', Arial, Helvetica, sans-serif;
}

/* texto */
.text-container {
  /* centralização */
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;

  justify-content: center;
  align-items: center;
  
  width: 100%;
  height: 100%;
  
  /* estilo */  
  font-size: 4rem;
  letter-spacing: 3px;
  
  /* fade out */
  transition: opacity 3s ease, transform 2s ease;
}
/* classe ativada via js */
.text-container.fade-out {
  pointer-events: none;
  opacity: 0;

  transform: translateY(10px);
}

.clickable-text {
  color: crimson;
  font-weight: 300;
  
  pointer-events: none;
  cursor: default;
  
  transition: text-shadow 3s ease;

  animation: fadeInText 3s ease-in-out both;
  animation-delay: 9s;
}
.clickable-text:hover {
  text-shadow: 
    0 0 16px rgba(220, 20, 60, 1),
    0 0 40px rgba(220, 20, 60, 0.8),
    0 0 80px rgba(220, 20, 60, 0.6),
    0 0 120px rgba(220, 20, 60, 0.4);
}
.clickable-text.ready {
  pointer-events: auto;
  cursor: pointer;
}

.unclickable-text {
  color: rgba(220, 20, 60, 0.8);

  font-weight: 300;

  animation: fadeInText 3s ease-in-out both;
  animation-delay: 1s;
}
.unclickable-text-alt {
  padding-bottom: 10rem;
  animation-delay: 4.5s;
}

/* imagem de fundo */
.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  background-image: url(../resources/backgrounds/cemetery-0.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  opacity: 0; 
  transition: opacity 2s ease-in-out; 
  z-index: 1;
}
/* classe ativada via js */
.bg-image.fade-in {
  opacity: 1;
}

/* overlay de gotas */
.rain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  
  pointer-events: none; 

  opacity: 0;
  
  z-index: 2; 

  mix-blend-mode: multiply; 
  filter: saturate(200%) blur(0.3rem);
}
/* classe ativada via js */
.rain-overlay.fade-in {
  opacity: 1; 
}

/* seta */
.arrow-btn {
  position: absolute;
  z-index: 10;

  --rot-x: 0deg;
  --rot-z: 0deg;

  transform: translateY(30px)
    rotateX(var(--rot-x)) rotateZ(var(--rot-z));
  
  opacity: 0; 

  cursor: pointer;
  pointer-events: none; 
  
  transition: opacity 2s ease, transform 2s ease-out, filter 3s ease;
}
.arrow-btn:hover {
  opacity: 0.5;

  filter: drop-shadow(0 0 16px rgba(220, 20, 60, 1))
  drop-shadow(0 0 40px rgba(220, 20, 60, 0.8))
  drop-shadow(0 0 80px rgba(220, 20, 60, 0.6))
  drop-shadow(0 0 120px rgba(220, 20, 60, 0.4));

  animation-play-state: paused;
}
/* classe ativada via js */
.arrow-btn.visible {
  opacity: 0.4;
  pointer-events: auto;
  transform: translateY(0)
    rotateX(var(--rot-x)) rotateZ(var(--rot-z));
}
.arrow-btn.blink {
  animation: blinkArrow 1.2s ease-in-out infinite alternate;
}

/* papel */
.paper-btn {
  position: absolute;
  z-index: 10;

  opacity: 0;
  cursor: pointer;
  pointer-events: none;

  transform: rotateZ(-10deg) rotateY(2deg)
    translateY(8px);
  filter: brightness(50%) blur(0.04rem);

  transition: opacity 1.2s ease, transform 0.6s ease, filter 1s ease;
}
/* classe ativada via js */
.paper-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: rotateZ(-10deg) rotateY(2deg)
    translateY(0);
}
.paper-btn.visible:hover {
  transform: rotateZ(-10deg) rotateY(2deg)
    translateY(-3px) ;

  animation-play-state: paused;
  filter: brightness(70%) blur(0.03rem)
          drop-shadow(0 0 16px rgba(220, 20, 60, 0.6))
}
.paper-btn.blink {
  animation: blinkPaper 1.2s ease-in-out infinite alternate;
}

/* para celulares */
@media (max-width: 768px) {
  /* reduz tamanho geral da fonte do container */
  .text-container {
    font-size: 2rem;
    padding: 0 1.5rem;
  }

  /* ajusta o texto do topo */
  .unclickable-text {
    font-size: 1.8rem;
  }

  /* reduz a margem gigante que empurrava o botão para fora da tela */
  .unclickable-text-alt {
    padding-bottom: 2.5rem;
    font-size: 1.4rem;
  }

  /* ajusta o botão principal */
  .clickable-text {
    font-size: 2.2rem;
    text-align: center;
  }
}

/* celulares pequenos ou deitados */
@media (max-height: 500px) and (orientation: landscape) {
  .text-container {
    font-size: 1.4rem;
  }

  .unclickable-text-alt {
    padding-bottom: 1rem;
  }

  .clickable-text {
    font-size: 1.8rem;
  }
}

/* animações */
@keyframes fadeInText {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes blinkArrow {
  0% {
    opacity: 0.4;
  }
  100% {
    opacity: 0.6;
    filter: drop-shadow(0 0 12px rgba(220, 20, 60, 0.8)); 
  }
}

@keyframes blinkPaper {
  0% {
    filter: brightness(50%) blur(0.04rem)
      drop-shadow(0 0 2px rgba(220, 20, 60, 0.3));
  }
  100% {
    filter: brightness(60%) blur(0.03rem)
      drop-shadow(0 0 12px rgba(220, 20, 60, 0.6))
      drop-shadow(0 0 25px rgba(220, 20, 60, 0.4));
  }
}