body {
  margin: 0;
  height: 100vh;
  width: 100vw;
  /* display: flex; */
  justify-content: center;
  align-items: center;

  background: transparent;
  background-color: #232323;

  height: 100%;
  width: 100%;

  background-image: url("../img/cover.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

h1 {
  font-family: 'Unutterable-Regular', sans-serif;
  transform-origin: bottom;

  text-align: center;
  font-size: 4rem;
  color: #63c64d;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 1;
  pointer-events: none;

  animation:
    flashing 4.3s steps(1, end) infinite;
    /* shifting 4.3s steps(1, end) infinite; */
}

.video-container {
  width: 30%;
  max-width: 100%;
  aspect-ratio: 16 / 9; /* Modern browsers handle this well */
  margin-left: auto;
  margin-right: auto;
  display: block;
  float: none;

  opacity: 0.6;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-container:hover {
  opacity: 1;
}

.adventure-container {
  width: 30%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  height: 0;
  overflow: hidden;

  width: 552px;
  height: 167px;
}

.adventure-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* height: 100%; */
  border: 0;
  display: block;
}


/* .centered iframe { */
/*   width: 560px; */
/*   height: 315px; */
/* } */

p {
  font-family: 'Unutterable-Regular', sans-serif;
  position: relative;
  top: 40%;
  width: 30%;
  text-align: center;
  font-size: 1.5rem;
  color: #63c64d;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 1;

  left: 50%;
  transform: translateX(-50%);

  background: rgba(0, 0, 0, 0.6);
  padding: 0.2em 0;
  border-radius: 1em;

  margin-top: 50px;

  animation:
    flashing 4.3s steps(1, end) infinite;	
}

.itch-button {
  position: relative;
  left: 50%;
  transform: translateX(-50%);

  background-color: #63c64d;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  /* transition: transform 0.2s, background 0.2s; */

  display: inline-block;
}

@font-face {
  font-family: 'Unutterable-Regular';
  src: url('../font/Unutterable-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Small phones */
@media (max-width: 600px) {
  .video-container {
    width: 90%;
    opacity: 0.9;

    margin-left: auto;
    margin-right: auto;
  }

  .adventure-container {
	width: 90vw;
    height: calc(90vw * 167 / 552);
  }

  p {
    width: 80%;
  }
}

/* Tablets and small desktops */
@media (min-width: 601px) and (max-width: 1024px) {
  .video-container {
    width: 90%;
    opacity: 0.9;

    margin-left: auto;
    margin-right: auto;
  }

  .adventure-container {
	width: 90vw;
    height: calc(90vw * 167 / 552);
  }

  p {
    width: 80%;
  }
}

/* Desktops and large screens */
@media (min-width: 1025px) {
  /* desktop styles */
}

/* text-shadow: 0 0 2px #fff, 0 0 5px #0fa, 0 0 10px #0fa; */
@keyframes shifting {
  /* Calm baseline */
  0%, 40% {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }

  /* Flash 1 — sudden left shift */
  41% {
    text-shadow: none;
    transform: scale(1.1) translateX(-12px) translateY(-6px);
  }
  46% {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }

  /* Flash 2 — mild shake */
  55% {
    text-shadow: none;
    transform: scale(1.05) translateX(4px) translateY(-4px);
  }
  57% {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }

  /* Flash 3 — vertical snap */
  70% {
    text-shadow: none;
    transform: scale(1.15) translateY(8px);
  }
  72% {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }

  /* Flash 4 — powerful upward flash */
  74% {
    text-shadow: none;
    transform: scale(1.5) translateY(-18px);
  }
  81% {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }

  /* Flash 5 — opposite direction shake */
  85% {
    text-shadow: none;
    transform: scale(1.1) translateX(14px) translateY(6px);
  }
  89% {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }

  /* Flash 6 — final jab */
  92% {
    text-shadow: none;
    transform: scale(1.12) translateX(20px) translateY(-10px);
  }
  98% {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transform: scale(1);
  }
}

@keyframes flashing {
  /* Calm baseline */
  0%, 40% {
    color: #63c64d;
  }

  /* Flash 1 — sudden left shift */
  41% {
    color: white;
  }
  46% {
    color: #63c64d;
  }

  /* Flash 2 — mild shake */
  55% {
    color: white;
  }
  57% {
    color: #63c64d;
  }

  /* Flash 3 — vertical snap */
  70% {
    color: white;
  }
  72% {
    color: #63c64d;
  }

  /* Flash 4 — powerful upward flash */
  74% {
    color: white;
  }
  81% {
    color: #63c64d;
  }

  /* Flash 5 — opposite direction shake */
  /* 85% { */
  /*   color: white; */
  /* } */
  /* 89% { */
  /*   color: #63c64d; */
  /* } */

  /* Flash 6 — final jab */
  92% {
    color: white;
  }
  98% {
    color: #63c64d;
  }
}
