:root {
  --brand-red: #b20606;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  background-color: #000;
  background-image: url('../img/moon-background.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
  color: var(--brand-red);
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
  min-height: 100vh;
  position: relative;
}

.main-content {
  position: absolute;
  right: 3vw;
  bottom: 3vh;
  width: clamp(160px, 25vw, 220px);
  padding: 20px;
  text-align: center;
}

.main-content p {
  margin: 0;
}

.contact-link {
  text-decoration: none;
  color: var(--brand-red);
  font-size: 15px;
}

#logo {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.6));
}

body.motion-start #logo {
  opacity: 0;
  transform: translate(-120vw, -15vh) scale(0.85) rotate(-90deg);
}

body.animate #logo {
  animation: tieFly 3s cubic-bezier(0.26, 0.8, 0.32, 1) forwards;
}

@keyframes tieFly {
  0% {
    opacity: 0;
    transform: translate(-120vw, -15vh) scale(0.85) rotate(-90deg);
  }

  40% {
    opacity: 1;
    transform: translate(-50vw, -5vh) scale(0.95) rotate(90deg);
  }

  75% {
    transform: translate(10vw, -2vh) scale(1) rotate(360deg);
  }

  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.animate #logo,
  body.motion-start #logo {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 600px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
  }

  .main-content {
    position: static;
    width: 100%;
    max-width: 280px;
    padding: 24px 18px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.55);
  }

  .contact-link {
    color: #ffe7c9;
    font-family: 'Lucida Console', 'Courier New', Courier, monospace;
    font-size: clamp(14px, 4vw, 18px);
    font-style: italic;
    letter-spacing: 0.14em;
    text-transform: lowercase;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
  }
}

@media (max-width: 480px) and (max-height: 620px) {
  body {
    display: block;
    padding: 0;
  }

  .main-content {
    position: absolute;
    left: 2vw;
    right: auto;
    bottom: 2vh;
    width: 50vw;
    height: 50vh;
    max-width: none;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  #logo {
    flex: 1;
    width: 100%;
    max-height: calc(50vh - 32px);
    object-fit: contain;
    margin-bottom: 6px;
  }

  .contact-link {
    font-size: 13px;
  }
}
