/* Shhhh I'm using three different fonts, but i don't care */
@import url("https://fonts.cdnfonts.com/css/longsile");
@import url("https://fonts.cdnfonts.com/css/thegoodmonolith");
@import url("https://fonts.cdnfonts.com/css/pp-neue-montreal");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --text: #ffcc00;
  --bg: #000000;
  --highlight-bg: #ffcc00;
  --type-line-opacity: 0.05;
  font-weight: bold;
}

a{
  color: inherit; /* or specify a desired color like #000000 for black */
  text-decoration: none;
}

body {
  background-color: var(--bg);
  min-height: 100vh;
  overflow: hidden;
  font-family: "Longsile", sans-serif;
  position: relative;
}

.background-frame { /* fix bg */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  /* background-image: url("https://assets.codepen.io/7558/web03.webp"); */
  background-color: wheat;
  background-size: 100% 100%;
  background-position: center;
  z-index: 0;
  pointer-events: none;
}

.bottom-gradient {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40vh;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.background-image {
  position: fixed;
  width: calc(100%);
  height: calc(100vh);
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 1;
  mix-blend-mode: multiply;
  transition: opacity 0.7s ease-in-out;
}

#default-bg {
  background-image: url("/assets/images/default-bg.jpg");
  opacity: 1;
}
#server-bg {
  background-image: url("/assets/images/server-bg.jpg");
}
#dev-bg {
  background-image: url("/assets/images/dev-bg1.jpg");
}
#home-bg {
  background-image: url("/assets/images/home-bg.jpg");
}

.text-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.hover-prompt-link {
  text-decoration: none;
  margin-top: 1rem; /* Add some space above it */
}

/* This styles the button box */
.hover-prompt {
  color: rgb(255, 115, 0);
  font-family: "TheGoodMonolith", monospace;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 1px;
  
  border: 1px solid var(--text); /* The border */
  border-radius: 20px;
  padding: 10px 10px;
  text-align: center;
  
  /* --- Remove old styles --- */
  /* opacity: 0.5; (we want it to be fully visible) */
  
  /* --- Add hover effect --- */
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hover-prompt-link:hover .hover-prompt {
  background-color: var(--text);
  color: var(--bg); /* Invert colors on hover */
}

.text-item {
  position: absolute;
  color: var(--text);
  font-size: 0.9rem;
  text-transform: uppercase;
  opacity: 1;
  white-space: nowrap;
  font-family: "TheGoodMonolith", monospace;
  z-index: 0;
}

.text-item::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -4px;
  width: 0;
  height: calc(100% + 4px);
  background-color: var(--highlight-bg);
  z-index: 1;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.text-item.highlight::after {
  width: calc(100% + 8px);
}

.text-item.highlight-reverse::after {
  width: 0;
  right: -4px;
  left: auto;
}

.main-content {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.sliced-container {
  position: relative;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  transform: translateZ(0);
}

.text-row {
  position: relative;
  width: 100%;
  height: 140px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  z-index: 100;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.text-content,
.char,
.char-inner {
  color: #ffa600e6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

.text-content {
  position: relative;
  font-size: 8rem;
  font-weight: normal;
  text-transform: uppercase;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  color: var(--text);
  letter-spacing: 0px;
  transition: letter-spacing 0.5s ease;
  visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.text-row:hover .text-content {
  letter-spacing: 5px;
  animation-play-state: paused;
}

.interactive-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: pointer;
}

.char {
  display: inline-block;
  position: relative;
  overflow: hidden;
  max-width: 80px;
  transition: max-width 0.64s cubic-bezier(0.86, 0, 0.07, 1);
  margin-right: 0px;
}

.text-row.active .char::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 80%;
  background-color: rgba(255, 204, 0, 0.2);
  transform: none;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
  animation-delay: calc(var(--char-index, 0) * 0.05s);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.char.narrow-char {
  max-width: 40px;
}

.char:last-child::after {
  display: none;
}

.char-inner {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 100%;
  will-change: transform;
  transform: translate3d(-20px, 0, 0);
}

.type {
  position: fixed;
  height: 100vmax;
  width: 100vmax;
  text-transform: uppercase;
  display: none;
  justify-content: center;
  align-content: center;
  text-align: center;
  top: 50%;
  left: 50%;
  margin-top: -50vmax;
  margin-left: -50vmax;
  will-change: transform;
  z-index: 5;
  transform-style: preserve-3d;
  pointer-events: none;
}

.type-line {
  white-space: nowrap;
  font-size: clamp(7rem, 18.75vh, 15rem);
  line-height: 0.75;
  font-weight: bold;
  font-family: "PP Neue Montreal", sans-serif;
  color: #ffffff;
  opacity: var(--type-line-opacity);
  user-select: none;
  will-change: transform, opacity;
  position: relative;
}

.type-line.odd {
  z-index: 50;
}

.type-line.even {
  z-index: 150;
}

/* Mobile Optimization */

/* For tablets and smaller screens */
@media screen and (max-width: 992px) {
  .text-content {
    font-size: 7rem;
  }

  .text-row {
    height: 110px;
  }

  .type-line {
    font-size: clamp(5rem, 12vh, 10rem);
  }
}

/* For mobile phones */
@media screen and (max-width: 768px) {
  .text-content {
    font-size: 5rem;
  }

  .text-row {
    height: 80px;
    margin: 8px 0;
  }

  .type-line {
    font-size: clamp(3.5rem, 8vh, 7rem);
  }

  .text-item {
    font-size: 0.7rem;
  }
}

/* For very small screens */
@media screen and (max-width: 480px) {
  .text-content {
    font-size: 3.5rem;
  }

  .text-row {
    height: 60px;
    margin: 6px 0;
  }

  .type-line {
    font-size: clamp(2.5rem, 6vh, 5rem);
  }

  .text-item {
    font-size: 0.6rem;
  }
  
  .text-item[data-text="| J"] {
    left: 5% !important; /* Starts at the edge */
  }
  .text-item[data-text="A"] {
    left: 20% !important; /* Spaced out */
  }
  .text-item[data-text="G"] {
    left: 35% !important; /* Spaced out */
  }
  .text-item[data-text="N"] {
    left: 50% !important; /* Spaced out */
  }
  .text-item[data-text="A |"] {
    left: 65% !important; /* Spaced out */
  }
  .text-item[data-text="WELCOME TO"] {
    left: 3% !important; /* Starts at the edge */
  }
  .text-item[data-text="ANGAJ.ORG"] {
    left: 17% !important; /* Spaced out */
  }
  .text-item[data-text="INSPIRE"] {
    left: 38% !important; /* Spaced out */
  }
  .text-item[data-text="motto"] {
    top: 47.5% !important; /* Spaced out */
  }
  .text-item[data-text="hollup"] {
    left: 13.5% !important; /* Spaced out */
  }
  .text-item[data-text="KEY"] {
    top: 13% !important; /* Spaced out */
    left: 47% !important;
  }
  
}
