* {
  margin: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

#root, #__next {
  isolation: isolate;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: center;
    gap: 1rem;
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    text-align: center;
  height: 100dvh;
}

body > * {
  position: relative;
  flex-grow: 1;
}

body::before {
  content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 200px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.0));
    z-index: 2;
}

body > * {
  z-index: 5;
}

header {
  padding-top: 2rem;
  display: block;
  width: 90vw;
  max-width: 800px;
  max-height: 300px;
  z-index: 2;
}

main,
article {
    position: fixed;
}

main,
article,
article > video {
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

article {
    opacity: 0;
    transition: all 0.4s;
}

article.active {
    opacity: 1;
    z-index: 10;
}

article > video {
  position: absolute;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: -1;
}

article > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
}

article h2 {
  font-size: 48px;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(20px);
  /* text-shadow: 0 0 5rem rgba(0, 0, 0, 0.8); */
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

article h2.smaller {
  font-size: 36px;
}

article.active h2 {
  animation-name: show-title;
  animation-duration: 2s;
  animation-fill-mode: forwards;
}

article h2 + h2 {
  animation-delay: 0.8s;
}

article h2 + h2 + h2 {
  animation-delay: 1.6s;
}

article h2 + h2 + h2 + h2 {
  animation-delay: 2.4s;
}

article h2 + h2 + h2 + h2 + h2 {
  animation-delay: 3.2s;
}

@keyframes show-title {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  display: inline-block;
  width: 100%;
  max-width: 200px;
  filter: grayscale(1) saturate(2) brightness(5);
}

.key {
    color: #000000;
    background-color: #ffffff;
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.2);
    border-radius: 0.325rem;
    transition: all 0.2s;
    cursor: pointer !important;
    user-select: none;
}

.btn-back {
  position: absolute;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  bottom: 2rem;
  left: 50%;
  font-size: 14px;
  transform: translateX(-50%);
}

.btn-back span {
    display: inline-block;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

.btn-forward {
  position: absolute;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  bottom: 2rem;
  right: 2rem;
  font-size: 14px;
}

.btn-forward .icon {
  display: block;
  width: 29px;
  height: 29px;
  background-image: url('./icon-redo.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px;
}

.btn-restart {
  position: absolute;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  bottom: 2rem;
  left: 50%;
  font-size: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: 0;
  animation: show-restart 1.4s forwards;
  animation-delay: 2s;
  pointer-events: none;
}

.btn-restart .icon {
  display: block;
  width: 29px;
  height: 29px;
  background-image: url('./icon-restart.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px;
}

.btn-back.disabled,
.btn-forward.disabled,
.btn-restart.disabled {
  opacity: 0 !important;
  cursor: not-allowed;
  pointer-events: none !important;
  animation: unset !important;
}

@keyframes show-restart {
  from {
    opacity: 0;
    pointer-events: none;
  }
  to {
    opacity: 1;
    pointer-events: all;
  }
}

