/* Entrance Animation - Company Name Only */

body.animation-active {
  overflow: hidden !important;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  position: fixed;
  width: 100%;
  background: radial-gradient(circle at top, #111111 0, #000 45%, #000 100%) !important;
  background-attachment: fixed !important;
}

.entrance-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  background: #000000;
  background: radial-gradient(circle at top, #111111 0, #000 45%, #000 100%);
  z-index: 10000;
  overflow: hidden;
  display: none; /* Hidden by default, will be shown only on first visit */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  touch-action: none; /* Prevent touch scrolling during animation */
  will-change: transform, opacity;
}

.entrance-animation.completed {
  transform: translateY(-100%);
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-out 0.9s;
  transform-origin: top center;
  pointer-events: none;
  opacity: 0;
}

/* Entrance Image */
.entrance-image {
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  max-width: 80%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  filter: blur(10px) brightness(0.8);
  animation: imageReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s forwards;
  z-index: 5;
}

@keyframes imageReveal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    filter: blur(10px) brightness(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.85);
    filter: blur(0px) brightness(1);
  }
}

/* Company Name */
.company-name {
  background: linear-gradient(135deg, #ffffff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  animation: namePopIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards;
  margin: 0;
  padding: 0 1rem;
  white-space: nowrap;
  z-index: 10;
  text-shadow: 0 0 30px rgba(245, 209, 66, 0.3);
  max-width: 95vw;
  word-break: break-word;
}

@keyframes namePopIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Responsive - Tablet */
@media (max-width: 768px) {
  .entrance-image {
    top: 60%;
    max-width: 85%;
    max-height: 50vh;
  }
  
  .company-name {
    top: 30%;
    font-size: clamp(1.2rem, 5vw, 2rem);
    padding: 0 1.5rem;
    letter-spacing: 0.06em;
  }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
  .entrance-image {
    top: 48%;
    max-width: 90%;
    max-height: 45vh;
    filter: blur(8px) brightness(0.8);
  }
  
  .company-name {
    top: 30%;
    font-size: clamp(1rem, 6vw, 1.5rem);
    padding: 0 1rem;
    letter-spacing: 0.04em;
    white-space: normal;
    line-height: 1.3;
    max-width: 90vw;
    word-break: keep-all;
    hyphens: none;
  }
  
  .entrance-animation.completed {
    transform: translateY(-100%);
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-out 0.9s;
    opacity: 0;
    pointer-events: none;
  }
}

/* Responsive - Small Mobile */
@media (max-width: 360px) {
  .entrance-image {
    top: 60%;
    max-width: 85%;
    max-height: 40vh;
  }
  
  .company-name {
    top: 28%;
    font-size: clamp(0.9rem, 7vw, 1.3rem);
    padding: 0 0.8rem;
  }
}
