:root {
  --color-orange: #EB5D35;
  --color-bg-darkblue: #292F6B;
  --color-bg-darkerblue: #141738;
  --color-text: #fff;
}

h1 {
  color: var(--color-text);
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* MARK: hamburger menu */
/* Extra hover gebied als flashlight aan is */
body:has(#flashlight-toggle:checked) .hamburger-btn::before {
  content: "";
  position: absolute;
  inset: -50px;
}

/* MARK: grid */
.information-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 1600px;
  height: 1600px; 
  /* padding: 50vh 50vw; */
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 3;

  & p {
    color: var(--color-text);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 350px;
    margin: 0;

    &:nth-child(1) {
      grid-column: 2;
      grid-row: 1;
      align-self: end;
      justify-self: end;
    }

    &:nth-child(2) {
      grid-column: 3;
      grid-row: 2;
      align-self: center;
      justify-self: end;
    }

    &:nth-child(3) {
      grid-column: 1;
      grid-row: 3;
      align-self: end;
      justify-self: center;
    }
  }

  & a {
    grid-column: 3;
    grid-row: 3;
    align-self: flex-end;
    justify-self: end;
  }

}

/* MARK: zaklamp */
.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

.cursor {
  width: 100vw;;
  aspect-ratio: 1;
  border-radius: 50%;
  position: absolute;

  left: 50%;
  top: calc(100% * var(--mouse-y, 0.5));
  transform: translate(-50%, -50%);

  background: radial-gradient(
              circle at center,
              rgba(var(--color-bg-darkerblue-rgba), 0) 0em,
              rgba(var(--color-bg-darkerblue-rgba), 0.2) calc(var(--width) / 2), 
              rgba(var(--color-bg-darkerblue-rgba), 0.9) calc(var(--width) / 2)
              );

  box-shadow:
    inset 0 0 0 1px var(--color-orange),
    inset 0 0 20px var(--color-orange),
    inset 0 0 100px var(--color-bg-darkerblue),
    0 0 40px var(--color-orange),
    0 0 100px var(--color-orange),
    0 0 120px var(--color-orange),
    0 0 200px var(--color-orange),
    0 0 0 200vmax var(--color-bg-darkerblue);

  transition: width 0.5s ease-out, opacity 0.5s ease;
}

.overlay.is-moving .cursor {
  width: 100vw;
  transition: width 0.2s ease-out;
}

body:has(.launch-button:hover) .cursor {
    width: 22em; 
    transition: width 0.5s ease-out; 
}


/* MARK: zaklamp aan/uit knop */
.toggle-container {
  position: fixed;
  top: 60px;
  right: 40px;
  z-index: 200;
}

#flashlight-toggle {
  display: none;
}

.toggle-label {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-size: 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  user-select: none;
}

.toggle-label:hover {
  background: rgba(255, 255, 255, 0.3);
}

.overlay.flashlight-off .cursor {
  opacity: 0;
  pointer-events: none;
}

body:has(#flashlight-toggle:checked) {
  cursor: none;
}

body:has(#flashlight-toggle:not(:checked)) {
  cursor: auto;
}

/* MARK: launch button */
.launch-button {
  display: inline-block;
  position: absolute;
  bottom: 60px;
  right: 40px;
  border-radius: 5px;
  text-decoration: none;
  z-index: 200;

  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 3px;
  transition: all 0.5s ease-out;

  color: var(--color-text);
  padding: 10px 10px;
  background: rgba(235, 93, 53, 0.2);
  border: 2px solid var(--color-orange);
  transform: scale(1.1) rotate(-2deg);

  box-shadow:
    0 0 15px rgba(235, 93, 53, 0.5),
    0 0 30px rgba(235, 93, 53, 0.3),
    inset 0 0 15px rgba(235, 93, 53, 0.2);

  text-shadow: 0 0 5px var(--color-text), 0 0 10px var(--color-orange);
  animation: pulseLaunchGlow 1.5s infinite alternate;
}

.launch-button:hover {
  color: var(--color-text);
  padding: 10px 10px;
  background: rgba(235, 93, 53, 0.2);
  border: 2px solid var(--color-orange);
  transform: scale(1.1) rotate(-2deg);

  box-shadow:
    0 0 15px rgba(235, 93, 53, 0.5),
    0 0 30px rgba(235, 93, 53, 0.3),
    inset 0 0 15px rgba(235, 93, 53, 0.2);

  text-shadow: 0 0 5px var(--color-text), 0 0 10px var(--color-orange);
  animation: pulseLaunchGlow 1.5s infinite alternate;
}

@keyframes pulseLaunchGlow {
  0% {
    box-shadow:
      0 0 15px rgba(235, 93, 53, 0.5),
      0 0 30px rgba(235, 93, 53, 0.3);
    border-color: var(--color-orange);
  }

  100% {
    box-shadow:
      0 0 25px rgba(235, 93, 53, 0.8),
      0 0 50px rgba(235, 93, 53, 0.6);
    border-color: var(--color-text);
  }
}

.stars-container {
  width: 100vw;
  height: 100svh;
  background-color: var(--color-bg-darkerblue);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.star-css {
  width: 4px;
  height: 4px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  position: absolute;
}

.container {
  position: absolute;
  inset: 0;
  width: 90vw;
  height: 90svh;
  z-index: 5;
}

.planet {
  position: absolute;
  width: clamp(6em, 15vw, 15em);
  aspect-ratio: 1;
  border-radius: 50%;

  transform: translate(
    calc(var(--x, 0) * 1px + var(--repel-x, 0) * 1px),
    calc(var(--y, 0) * 1px + var(--repel-y, 0) * 1px)
  );

  transition: transform 0.08s linear;
  overflow: hidden;
}


.planet model-viewer {
    
    width: 100%;
    height: 100%; 
    display: block;
}








@media (min-width: 768px) {
  body {
    overflow: hidden;
  }

  .launch-button {
    padding: 5px 5px;
    color: var(--color-bg-darkblue);
    background: transparent;
    border: 1px solid var(--color-bg-darkblue);
    
    transform: scale(1) rotate(0deg);
    box-shadow: none;
    text-shadow: none;
    animation: none; 
  }
  
  .information-grid {
    width: 100vw; 
    height: 100vh;
    padding: 4rem;
    z-index: 2;
  }

  .information-grid p {
    font-size: .75em;
    max-width: 260px; 
    z-index: 2;
  }

  .cursor {
    width: 10em;
    left: calc(100% * var(--mouse-x, .5));
    top: calc(100% * var(--mouse-y, .5));
  }

  .overlay.is-moving .cursor {
    width: 25em;
    transition: width 0.2s ease-out;
  }
}

@media (min-width: 1024px) {
  .information-grid p {
    font-size: .75em;
    max-width: 350px; 
  }
}

@media (max-width: 768px) {
  .information-grid {
    display: block;          
    position: fixed;  
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 30em;   
    width: 100%;             
    height: 60%;            
    padding: 2rem;
    box-sizing: border-box;
    overflow-x: hidden;              
  }

  .information-grid p {
    max-width: 100%;         
    margin-bottom: 3.5em;   
    text-align: left;
    font-size: .9em;
  }

  .information-grid a.launch-button {
    display: inline-block;
    position: fixed;
    margin-bottom: 2em;
    bottom: 0;
    right: 40px;
  }

  .launch-button:hover {
    background: rgba(255, 255, 255, 0.5);

  }
}