/* Hero Styles */
.hero {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  /* Fix for mobile layout shifts */
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  max-width: 100vw;
}

/* Description text styling */
.hero-description {
  position: absolute;
  top: 2rem;
  transform: translateX(0);
  text-align: left;
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 00;
  line-height: 1.4;
  pointer-events: none;
  z-index: 1;
  user-select: none;
  width: 100%;
  max-width: 100vw;
  padding: 1rem 5rem;
}

.distortion-text {
  display: inline-block;
  white-space: nowrap;
  position: relative;
  z-index: 10;
  font-size: 10rem;
  color: var(--color-text);
}

/* Expertise wrapper styling */
.expertise-wrapper {
  position: relative;
  display: inline-block;
  min-width: 200px;
  white-space: nowrap;
}

/* Expertise keyword styling */
.expertise-keyword {
  display: inline-block;
  position: relative;
  font-weight: 900;
  border-radius: 9999px;
  min-width: 50px;
  white-space: nowrap;
}

/* Animation classes */
.expertise-keyword.fadeOut {
  animation: fadeOut 0.5s forwards;
}

.expertise-keyword.fadeIn {
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  height: 100%;
  width: 100%;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  .hero {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    height: 100dvh; /* Modern viewport height that handles mobile browser chrome */
    min-height: -webkit-fill-available;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Prevent content shift by making padding consistent */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero-description {
    text-align: left;
    left: 0;
    width: 100%;
    top: 2rem;
    padding: 0rem 2rem;
    font-size: clamp(1.4rem, 3.5vw, 1.5rem);
    font-size: 1.7rem;
    font-weight: 400;
    line-height: 1.4;
  }

  .expertise-wrapper {
    min-width: 120px;
    border-bottom-width: 1px;
  }

  .distortion-text {
    font-size: 2.5rem;
    top: 14rem !important;
  }
}
