:root {
  --color-grey: #343334;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

#start {
  scroll-padding-top: 20rem;
}

.start-block {
  position: relative;
  overflow: visible;
  min-height: 100vh;
  background-color: var(--color-grey);
}

.start-block__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--color-grey);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  background-blend-mode: multiply;
  clip-path: inset(0 100% 0 0 round 0 50vh 50vh 0);
  animation: bg-slide-in 2.4s cubic-bezier(0.22, 1, 0.36, 1) 1s both;
  will-change: clip-path;
}

@keyframes bg-slide-in {
  from {
    clip-path: inset(0 100% 0 0 round 0 50vh 50vh 0);
  }

  to {
    clip-path: inset(0 -50vh 0 0 round 0 50vh 50vh 0);
  }
}

.start-block__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  padding: 5rem 0;
}

.start-block__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  clip-path: inset(0 100% 0 0);
  transform: translate3d(-50%, -50%, 0) scale(1.65);
  transform-origin: center;
  animation:
    logo-reveal 0.45s cubic-bezier(0.25, 1, 0.5, 1) forwards,
    logo-intro 1.65s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
  will-change: transform, top, clip-path;
}

.start-block__logo img {
  width: 421px;
  max-width: 100%;
  height: auto;
}

@keyframes logo-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0);
  }
}

@keyframes logo-intro {
  from {
    top: 50%;
    transform: translate3d(-50%, -50%, 0) scale(1.65);
  }

  to {
    top: 15%;
    transform: translate3d(-50%, 0, 0) scale(1);
  }
}

.start-block__bubbles {
  position: absolute;
  bottom: 25%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 2.25rem;
  transform: translateX(-50%);
}

.start-block__bubble-float {
  flex-shrink: 0;
  opacity: 0;
  transform: translate3d(0, 70px, 0) scale(0.96);
  animation:
    bubble-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    bubble-float 4.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  animation-delay: 1.2s, 1.75s;
  will-change: transform, opacity;
}

.start-block__bubble-float:nth-child(1) {
  animation-delay: 1.2s, 1.75s;
}

.start-block__bubble-float:nth-child(2) {
  animation-delay: 1.27s, 1.82s;
}

.start-block__bubble-float:nth-child(3) {
  animation-delay: 1.34s, 1.89s;
}

.start-block__bubble-float:nth-child(4) {
  animation-delay: 1.41s, 1.96s;
}

.start-block__bubble-float:nth-child(5) {
  animation-delay: 1.48s, 2.03s;
}

.start-block__bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  color: #fff;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.start-block__bubble:hover {
  font-weight: 400 !important;
  transform: scale(1.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.start-block__bubble--small {
  width: 174px;
  height: 174px;
}

.start-block__bubble--big {
  width: 260px;
  height: 260px;
}

.start-block__bubble img {
  width: 65%;
  height: auto;
  margin-bottom: 12px;
}

.start-block__bubble span {
  font-size: 1rem;
}

@keyframes bubble-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 70px, 0) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes bubble-float {
  0% {
    transform: translate3d(0, 0, 0);
  }

  22% {
    transform: translate3d(0, -15px, 0);
  }

  48% {
    transform: translate3d(0, 11px, 0);
  }

  72% {
    transform: translate3d(0, -9px, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

.start-block::after {
  content: "";
  position: absolute;
  bottom: -30vh;
  left: 50%;
  z-index: 1;
  width: 140%;
  height: 50vh;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  filter: blur(90px);
  background: radial-gradient(
    ellipse at center,
    rgba(92, 101, 66, 0.55) 0%,
    rgba(92, 101, 66, 0.35) 25%,
    rgba(92, 101, 66, 0.15) 50%,
    transparent 75%
  );
  transition: opacity 0.4s ease;
}

.start-block.is-glowing::after {
  opacity: 1;
}

.bubble-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0);
  transform-origin: center;
  transition:
    transform 2s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}

.bubble-transition-overlay.is-active {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(180);
}

.bubble-transition-overlay.is-fading {
  transition:
    opacity 0.4s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.bubble-transition-glow {
  position: fixed;
  inset: 0;
  z-index: 9990;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: clip;
  contain: paint;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      ellipse 115vw 90vh at 50% 115%,
      var(--bubble-transition-color, #5c6542) 0%,
      rgba(255, 255, 255, 0.16) 18%,
      transparent 55%
    ),
    radial-gradient(
      circle 90vh at 50% 110%,
      var(--bubble-transition-color, #5c6542) 0%,
      transparent 72%
    );
  transition: opacity 0.8s ease;
}

.bubble-transition-glow.is-active {
  opacity: 0.95;
}

.bubble-transition-glow.is-fading {
  opacity: 0;
}

@media (max-width: 992px) {
  .start-block__bubbles {
    gap: 1rem;
  }

  .start-block__bubble--small {
    width: 105px;
    height: 105px;
  }

  .start-block__bubble--big {
    width: 160px;
    height: 160px;
  }

  .start-block__bubble span {
    font-size: 0.8rem;
  }

  .start-block__bubble img {
    margin-bottom: 8px;
  }
}

@media (max-width: 768px) {
  .start-block__bubbles {
    display: none;
  }

  .start-block__logo {
    animation-name: logo-reveal, logo-intro-mobile;
  }

  @keyframes logo-intro-mobile {
    from {
      top: 50%;
      transform: translate3d(-50%, -50%, 0) scale(1.65);
    }

    to {
      top: 15%;
      transform: translate3d(-50%, 0, 0) scale(1.35);
    }
  }
}

@media (max-height: 1200px) and (min-width: 769px) {
  .start-block__logo img {
    width: 300px;
  }

  .start-block__bubble--small {
    width: 105px;
    height: 105px;
  }

  .start-block__bubble--big {
    width: 150px;
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .start-block__bg {
    clip-path: none;
    animation: none;
  }

  .start-block__logo {
    clip-path: none;
  }

  .start-block__logo,
  .start-block__bubble-float {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .start-block__bubble {
    transition: none;
  }
}
