* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #fafafa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-base {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(231, 95, 36, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(231, 95, 36, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center center;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.4s ease;
}

body.show-grid .grid-base {
  opacity: 1;
}

.grid-pulse {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(231, 95, 36, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(231, 95, 36, 0.22) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center center;
  pointer-events: none;
  z-index: 2;
  -webkit-mask-image: radial-gradient(circle, transparent 32%, black 50%, transparent 68%);
  mask-image: radial-gradient(circle, transparent 32%, black 50%, transparent 68%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0;
}

body.show-grid .grid-pulse-1 {
  animation: grid-inward-wave 9s cubic-bezier(0.25, 0.9, 0.35, 1) infinite;
}

body.show-grid .grid-pulse-2 {
  animation: grid-inward-wave 9s cubic-bezier(0.25, 0.9, 0.35, 1) infinite 4.5s;
}

@keyframes grid-inward-wave {
  0% {
    -webkit-mask-size: 240vmax 240vmax;
    mask-size: 240vmax 240vmax;
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  80% {
    opacity: 0.6;
  }
  100% {
    -webkit-mask-size: 0vmax 0vmax;
    mask-size: 0vmax 0vmax;
    opacity: 0;
  }
}

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.loader-wrapper {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: transform 0.75s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.6s ease;
  z-index: 20;
}

.dot {
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.2);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.dot-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #e75f24;
  display: block;
}

.loader-wrapper.step-1 .dot-1 {
  opacity: 1;
  transform: scale(1);
}

.loader-wrapper.step-2 .dot-2 {
  opacity: 1;
  transform: scale(1);
}

.loader-wrapper.step-3 .dot-3 {
  opacity: 1;
  transform: scale(1);
}

.loader-wrapper.is-vertical {
  transform: rotate(90deg);
}

.loader-wrapper.is-split .dot {
  transition: transform 0.85s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.65s ease;
}

.loader-wrapper.is-split .dot-1 {
  transform: translateX(-140px);
}

.loader-wrapper.is-split .dot-2 {
  opacity: 0;
  transform: scale(0.2);
}

.loader-wrapper.is-split .dot-3 {
  transform: translateX(140px);
}

.loader-wrapper.is-fading {
  opacity: 0;
}

.loader-wrapper.is-done {
  display: none;
}

.content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 30;
  padding: 0 24px;
}

.content.is-visible {
  opacity: 1;
  transform: scale(1);
}

.logo-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: min(520px, 82vw);
  height: auto;
  max-height: 170px;
  object-fit: contain;
  display: block;
}

.brand-text {
  margin-top: 32px;
  font-family: 'Jaldi', sans-serif;
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: #111111;
  padding-left: 0.45em;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease 0.25s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.content.is-visible .brand-text {
  opacity: 1;
  transform: translateY(0);
}
