@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;900&display=swap');

/* Placeholder styles - START */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Public Sans', sans-serif;
  font-optical-sizing: auto;
}

.nav-placeholder {
  height: 60px;
  border-bottom: 1px solid #d8d8d8;
  color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-placeholder {
  height: 200svh;
  background-color: #fafafa;
  display: flex;
  justify-content: center;
  color: #ddd;
  padding: 2rem;
}
/* Placeholder styles - END */

/* Hero styles - START */
#hero {
  position: relative;
  overflow: hidden;
}

@keyframes heroPulse {
  0% {
    opacity: 1;
    transform: scale(0);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

#hero:not(.loaded):after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: calc(50vh - 10px);
  left: calc(50vw - 10px);
  background-color: #0069bc;
  border-radius: 50%;
  opacity: 0;
  animation: heroPulse 1.4s ease-out infinite 1.5s;
}

#hero .hero-text {
  position: relative;
  z-index: 1;
  padding-inline: 40px;
  opacity: 0;
  transition: opacity 1.4s 0.1s;
  transform-origin: center top;
  transform: scale(calc(1 - var(--scroll-progress) * 0.1));
}

#hero.loaded .hero-text {
  opacity: 1;
}

#hero .logo {
  display: block;
  width: 100px;
  margin-inline: auto;
  /*margin-top: 2rem;*/
}

@media screen and (min-width: 1024px) {
  #hero .logo {
    width: 100px;
    /*margin-top: 2.75rem;*/
  }
}

#hero .title {
  font-weight: 900;
  font-size: 45px;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: center;
  margin-top: 1.375rem;
}

@media screen and (min-width: 1024px) {
  #hero .title {
    font-size: 86px;
    margin-top: 1rem;
  }
}

#hero .subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  text-align: center;
  margin-top: 1.625rem;
  margin-inline: auto;
  max-width: 880px;
}

@media screen and (min-width: 1024px) {
  #hero .subtitle {
    font-size: 22px;
    margin-top: 1.2rem;
  }
}

#hero .stage {
  margin-top: 2rem;
  position: relative;
  /*height: 40svh;*/
  aspect-ratio: 2.5; /* increate to make height smaller */
  background-color: #fff;
}

@media screen and (min-width: 1024px) {
  #hero .stage {
    margin-top: -6rem;
    min-height: 400px;
    /*height: 75vh;*/
  }
}

:is(#hero .stage) canvas {
  margin-top: -1rem;
}

@media screen and (min-width: 1024px) {
  :is(#hero .stage) canvas {
    margin-top: 1rem;
  }
}

#hero .fg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero .fg-item {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

:is(#hero .fg-item) img {
  height: 100%;
}

@media screen and (min-width: 1024px) {
  :is(#hero .fg-item) img {
    height: calc(100% - 8rem);
  }
}

#hero .streetcar {
  transform-origin: center 85%;
  transform: scale(0.4);
  opacity: 0;
  transition: transform 1.4s, opacity 0.2s;
}

:is(#hero .streetcar) img {
  transform-origin: center 85%;
  transform: translateY(calc(var(--scroll-progress) * 5%))
    scale(calc(1 + var(--scroll-progress) * 0.15));
}

#hero .shadow {
  transform-origin: center 85%;
  transform: scale(0.4);
  opacity: 0;
  transition: transform 1.4s, opacity 1s ease-out;
}

:is(#hero .shadow) img {
  transform-origin: center 85%;
  transform: translateY(calc(var(--scroll-progress) * 5%))
    scale(calc(1 + var(--scroll-progress) * 0.15));
}

#hero .track {
  opacity: 0;
  transition: opacity 0.2s;
}

#hero.loaded .streetcar,
#hero.loaded .shadow {
  transform: scale(1);
  opacity: 1;
}

#hero.loaded .track {
  opacity: 1;
}
