
/* Define Variables */
:root{
  --animation-duration: all 0.3s ease-in-out;
  --line-height: 54px;
  --font-size: 40px;
}

/*
  1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
    box-sizing: border-box;
  }
  /*
    2. Remove default margin
  */
  * {
    margin: 0;
  }
  /*
    3. Allow percentage-based heights in the application
  */
  html, body {
    height: 100%;
  }

  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }
  /*
    7. Remove built-in form typography styles
  */
  input, button, textarea, select {
    font: inherit;
  }
  /*
    8. Avoid text overflows
  */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
  /*
    9. Create a root stacking context
  */
  #root, #__next {
    isolation: isolate;
  }

  body {
    display: flex;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    background-color: #111;
    animation: fadeInAnimation ease 1s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    animation-delay: 0.3s;
    opacity: 0;
  }

  @keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
     }
  }

  h1, p {
    font-family: 'VT323','Courier New', Courier, monospace;
    font-style: normal;
    font-weight: 400;
    font-size: var(--font-size);
    line-height: var(--line-height);
    /* or 133% */
    text-transform: uppercase;
    color: rgba(205, 205, 205, 0.9);
    text-shadow: 1px -2px 1px rgba(126, 255, 170, 0.25), -4px 0px 1px rgba(255, 0, 0, 0.15), 4px 0px 1px rgba(0, 194, 255, 0.15);
    filter: blur(0.5px);
    padding-bottom: var(--line-height);
    transition: var(--animation-duration);
  }
  .container {
    width:90%;
    max-width: 650px;
    padding: 64px 16px;
    /* transform: rotate(-0.2deg); */
    transition: var(--animation-duration);

  }
  body::before {
    content: "";
    background-image:url('img/vhs.gif'); /* Fallback */
    background-image: -webkit-image-set(
      url('img/vhs.webp') 1x
    );
    background-image: image-set(
      url('img/vhs.webp') 1x
    );
    background-size: cover;
    position: fixed;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    opacity: 0.1;
    transition: var(--animation-duration);
}

.emoji {
  font-family: 'Noto Emoji', sans-serif;
  line-height: var(--line-height);
  font-size: calc(var(--font-size) - 8px);
  transition: var(--animation-duration);
}

/* Links: replicate underline that clears descenders */
a:link,
a:visited {
    color: rgba(255, 168, 168, 0.9);
    text-decoration: none;
}
a:hover {
  color: rgba(255, 120, 120, 0.9);
}
a:focus-visible {
  outline: 2px solid rgba(255, 168, 168, 0.8);
  outline-offset: 3px;
  border-radius: 1px;
}


/* Transitions for mobile */
@media only screen and (max-width:600px){

  :root{
    --line-height: 48px;
    --font-size: 38px;
  }

  .container {
    padding: var(--line-height) 20px;
  }

  body::before{
    opacity: 0;
  }

  h1, p {
    text-shadow: 1px -2px 1px rgba(126, 255, 170, 0.15), -4px 0px 1px rgba(255, 0, 0, 0.15), 4px 0px 1px rgba(0, 194, 255, 0.10);
    filter: blur(0px);

  }
}

/* Respect reduced-motion preference: skip animation (body would stay invisible) and transitions */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    opacity: 1;
  }
  h1, p, .container, body::before, .emoji {
    transition: none;
  }
}
