@font-face {
  font-family: 'Gilroy Loader';
  src: url('/loading/Gilroy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
}

.initial-loading {
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: #fff;
  color: #666;
  font-family: 'Gilroy Loader', Arial, sans-serif;
  text-align: center;
}

.initial-loading__logo {
  width: min(200px, 52vw);
  height: auto;
  margin-bottom: 48px;
  filter: grayscale(1) opacity(.7);
}

.initial-loading__scene {
  width: min(860px, 90vw);
  aspect-ratio: 2.8 / 1;
  position: relative;
  overflow: hidden;
}

.initial-loading__scene::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.8%;
  border-top: 1px solid #c8c8c8;
}

.initial-loading__scene img {
  position: absolute;
  object-fit: contain;
  filter: grayscale(1) opacity(.55);
}

.initial-loading__crane {
  width: 17%;
  height: 74%;
  bottom: 4%;
  left: 0;
  object-position: bottom left;
}

.initial-loading__building {
  width: 25%;
  height: 83%;
  bottom: 4%;
  left: 9%;
  object-position: bottom;
}

.initial-loading__home {
  width: 28%;
  height: 54%;
  bottom: 4%;
  right: 0;
  object-position: bottom;
}

.initial-loading__car {
  position: absolute;
  z-index: 2;
  width: 12%;
  bottom: 1%;
  left: 0;
  filter: grayscale(1) contrast(.5) brightness(1.33);
  animation: initial-car 5s linear infinite;
}

.initial-loading__car img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  filter: none;
}

.initial-loading__wheel {
  position: absolute;
  overflow: visible;
}

.initial-loading__wheel--rear {
  left: 18.27%;
  top: 64.95%;
  width: 10.38%;
  height: 25.23%;
}

.initial-loading__wheel--front {
  left: 71.73%;
  top: 64.95%;
  width: 10.38%;
  height: 25.23%;
}

.initial-loading__wheel-spokes {
  transform-origin: center;
  animation: initial-wheel .8s linear infinite;
}

.initial-loading__plane {
  z-index: 3;
  width: 12%;
  top: 0;
  left: 0;
  transform: scaleX(-1);
  animation: initial-plane 5s linear 1s infinite backwards;
}

.initial-loading__title {
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 400;
  margin: 30px 0 10px;
}

.initial-loading__message {
  margin: 0;
  color: #777;
  font-size: 15px;
}

.initial-loading__track {
  width: min(260px, 65vw);
  height: 4px;
  background: #ececec;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 18px;
}

.initial-loading__track::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: #467E61;
  border-radius: inherit;
  animation: initial-progress 1.5s ease-in-out infinite;
}

.initial-loading__retry {
  display: none;
  margin-top: 16px;
  padding: 8px 18px;
  background: #fff;
  color: #666;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
}

.initial-loading--error .initial-loading__track {
  display: none;
}

.initial-loading--error .initial-loading__retry {
  display: inline-block;
}

@keyframes initial-progress {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}

@keyframes initial-wheel {
  to {
    transform: rotate(360deg);
  }
}

@keyframes initial-car {
  0% {
    left: 0;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  94% {
    opacity: 1;
  }
  100% {
    left: 88%;
    opacity: 0;
  }
}

@keyframes initial-plane {
  0% {
    left: 0;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 95%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .initial-loading__plane, .initial-loading__car, .initial-loading__wheel-spokes, .initial-loading__track::after {
    animation: none;
  }
}

