.hero {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100vh;
  background-image: url("../assets/img/backgrounds/hero-background.webp");
  background-size: cover;
  justify-content: center;
  margin-bottom: clamp(3rem, 6vw, 7rem);
  padding-top: 9rem;

  @media (min-width: 901px) {
    padding-top: 14rem;
  }
}

.hero__container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  width: fit-content;
  margin-inline: auto;
  position: relative;
  gap: clamp(0.5rem, 2vw, 2rem);
}

.hero__greeting {
  position: relative;
  cursor: pointer;
}

.hero__hello {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border: 2px solid var(--base-color-bright);
  color: var(--base-color-bright);
  border-radius: var(--border-radius-button);
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  transition:
    background 0.3s,
    border-color 0.3s;

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--highlight-color-3-blue);
    border-radius: var(--border-radius-button);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.5s ease;
  }

  &:hover::after {
    clip-path: inset(0 0% 0 0);
  }
}

.hero__name {
  background: var(--highlight-color-3-blue);
  border: 1px solid var(--base-color-bright);
  color: var(--base-color-bright);
  border-radius: var(--border-radius-button);
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  white-space: nowrap;
  position: absolute;
  top: -0.75rem;
  left: 0px;
  bottom: -0.75rem;
  z-index: 1;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s ease;

  @media (hover: none) {
    clip-path: inset(0 0% 0 0);
  }

  .hero__greeting:hover & {
    clip-path: inset(0 0% 0 0);
  }
}

.hero__wave {
  left: 13.1875rem;
  position: absolute;
  top: -3.25rem;
  transform: translateX(-80px) rotate(-360deg);
  opacity: 0;
  transition:
    transform 0.6s ease,
    opacity 0.4s ease;

  .hero__greeting:hover & {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }

  @media (hover: none) {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }
  @media (max-width: 500px) {
    left: 0;
    top: -3rem;
  }

  & img {
    width: 100%;

    @media (max-width: 500px) {
      width: 85%;
    }
  }
}

.hero__content {
  display: flex;
  padding-top: 1rem;

  @media (max-width: 900px) {
    flex-direction: column;
    align-items: flex-start;
  }
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: flex-end;

  @media (max-width: 900px) {
    width: 100%;
    align-self: flex-end;
  }
}

.hero__title {
  color: var(--base-color-bright);
  font-size: clamp(3rem, 10vw, 10rem);
  line-height: 1;

  @media (max-width: 900px) {
    font-size: clamp(2rem, 12vw, 7rem);
    align-self: flex-start;
  }

  & > span {
    display: block;
  }
  & > span:nth-child(2) {
    padding-left: clamp(0.5rem, 9.7vw, 8.75rem);

    @media (max-width: 900px) {
      padding-left: 0;
    }
  }
}

.hero__footer {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 2rem;
  position: relative;
}

.polaroid {
  position: absolute;
  right: 0;
  top: 0;
  width: clamp(8rem, 17vw, 17rem);
  transform: rotate(6deg);
  translate: 0 -35%;
  cursor: pointer;

  @media (max-width: 900px) {
    position: relative;
    width: clamp(130px, 50vw, 220px);
    margin-block: 2.5rem 3rem;
    align-self: center;
    translate: none;
  }
}

.polaroid__photo {
  position: absolute;
  top: 5.5%;
  left: 5.5%;
  width: 89%;
  height: 78%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1);
  transition: filter 0.4s ease;

  .polaroid:hover & {
    filter: grayscale(0);
  }

  @media (hover: none) {
    filter: none;
  }
}

.polaroid__frame {
  position: relative;
  height: auto;
  width: 100%;
  z-index: 1;
}

.polaroid__label {
  position: absolute;
  bottom: 7%;

  width: 100%;
  text-align: center;
  font-family: var(--font-family-highlight);
  color: var(--base-color-dark);
  font-size: clamp(0.8rem, 1.6vw, 2rem);
  z-index: 2;
  left: 0;
  transition: color 0.3s ease;

  &::after {
    content: attr(data-hover);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--base-color-dark);

    @media (hover: none) {
      opacity: 1;
    }
  }
  @media (hover: none) {
    color: transparent;
  }

  .polaroid:hover & {
    color: transparent;
  }

  .polaroid:hover &::after {
    opacity: 1;
  }
}

.social-links {
  position: absolute;
  display: flex;
  gap: clamp(0.4rem, 0.6vw, 0.8rem);
  flex-direction: column;
  bottom: clamp(2rem, 10vh, 18rem);
  left: 5rem;
  list-style: none;
  padding: 0;

  @media (max-width: 750px) {
    display: none;
  }
}

.social-links__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.5rem, 2.5vw, 4.5rem);
  height: clamp(2.5rem, 2.5vw, 4.5rem);
  border: 2px solid white;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--highlight-color-3-blue);
    clip-path: inset(100% 0 0 0);
    transition: clip-path 0.4s ease;
  }

  &:hover::before {
    clip-path: inset(0 0 0 0);
  }
}

.social-links__icon {
  width: 80%;
  filter: brightness(0) invert(1);
  position: relative;
  z-index: 1;
}

.letter {
  display: inline-block;
  position: relative;
  line-height: 1;
  padding: 0.016em 0.025em;
  transition:
    color 0.2s,
    transform 0.2s;

  &:hover {
    color: transparent;
  }

  &::after {
    content: attr(data-hover);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    text-align: center;
    color: var(--highlight-color-3-blue);
    opacity: 0;
    transition: opacity 0.2s;
  }
  &:hover::after {
    opacity: 1;
  }
}
