* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

body {
  overflow: hidden;
  background: #000;
}

/* HERO */
.hero {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

/* Desktop video */
.hero video.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  animation: videoShift 15s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Mobile fallback image */
.hero img.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: none; /* hidden by default, only shown on mobile */
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.2;
  color: #fff;
}

.hero-content .terra {
  color: #00b300; /* Terra green */
  font-weight: 600;
}

.hero-content .rewilding {
  color: #fff;
  font-weight: 300;
  letter-spacing: 0.2em;
  margin-top: 0.3em;
}

.enter-btn {
  margin-top: 30px;
  padding: 10px 32px;
  border: 2px solid #ffffff;
  background: transparent;
  color: #ffffff;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.enter-btn:hover {
  background: #fff;
  color: #000;
}

/* FADE OUT HERO */
.hero.fade-out {
  animation: fadeOut 1.2s ease forwards;
  pointer-events: none;
}

/* ===== MESSAGE SCREEN CONTAINER ===== */
#messageScreen {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  padding: 0 25px;
  pointer-events: none;
  z-index: 1000;

  opacity: 0;
  visibility: hidden;

  /* Start far away */
  transform: perspective(1200px) translateZ(-800px) scale(0.3);

  /* Slight blur while far */
  filter: blur(6px);

  transition:
    opacity 2.8s ease,
    transform 2.8s cubic-bezier(.22,1,.36,1),
    filter 2.8s ease,
    visibility 2.8s ease;
}


/* ===== SHOW STATE (Zoom Toward Viewer) ===== */
#messageScreen.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  filter: blur(0);

}


/* ===== MESSAGE TEXT ===== */
#messageScreen span {
  max-width: 850px;

  color: #ffffff;

  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.6;

  -webkit-font-smoothing: antialiased;

  /* Glow + depth */
  text-shadow:
    0 0 12px rgba(255,255,255,0.35),
    0 0 40px rgba(255,255,255,0.15),
    0 10px 40px rgba(0,0,0,0.6);

  animation:
    textFloat 6s ease-in-out infinite,
    glowPulse 4.5s ease-in-out infinite;
}


/* ===== FLOATING MOTION (Alive Feeling) ===== */
@keyframes textFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}


/* ===== GLOW BREATHING EFFECT ===== */
@keyframes glowPulse {
  0%,100% {
    text-shadow:
      0 0 12px rgba(255,255,255,0.35),
      0 0 40px rgba(255,255,255,0.15),
      0 10px 40px rgba(0,0,0,0.6);
  }

  50% {
    text-shadow:
      0 0 22px rgba(255,255,255,0.6),
      0 0 70px rgba(255,255,255,0.25),
      0 15px 60px rgba(0,0,0,0.75);
  }
}





/* STARFIELD */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ANIMATIONS */
@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; }
}

@keyframes videoShift {
  0%   { transform: scale(1.02) translateY(0); }
  50%  { transform: scale(1.03) translateY(-1%); }
  100% { transform: scale(1.02) translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  /* Hero text */
  .hero-content h1 {
      font-size: clamp(1.6rem, 6vw, 3rem);
  }

  /* Enter button smaller */
  .enter-btn {
      padding: 6px 22px;
  }

  /* Message bigger on mobile tablets */
  #messageScreen {
      font-size: clamp(1.8rem, 6vw, 2.6rem);
      line-height: 1.7;
      padding: 0 15px;
  }

  /* Mobile fallback — show image instead of video */
  .hero video.hero-video {
      display: none !important;
  }

  .hero img.hero-image {
      display: block;
  }
}

@media (max-width: 480px) {
  /* Hero text smaller for small phones */
  .hero-content h1 {
      font-size: clamp(1.4rem, 5vw, 2.5rem);
  }

  /* Message slightly smaller for small phones */
  #messageScreen {
      font-size: clamp(1.6rem, 5vw, 2.2rem);
      line-height: 1.7;
      padding: 0 10px;
  }
}

/* PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  video,
  canvas {
      animation: none !important;
  }
}
