:root {
  --color-white: #faf8f4;
}

html.site-gate-pending,
html.site-gate-pending body,
html.invest-gate-pending,
html.invest-gate-pending body {
  overflow: hidden;
  height: 100%;
}

html.site-gate-pending,
html.site-gate-pending body,
html.invest-gate-pending,
html.invest-gate-pending body {
  background: var(--color-white);
}

html.site-gate-pending body,
html.invest-gate-pending body {
  visibility: hidden;
}

html.site-gate-pending .site-gate,
html.invest-gate-pending .invest-gate {
  visibility: visible;
}

html.site-gate-active,
html.site-gate-active body {
  overflow: hidden;
  height: 100%;
  background: var(--color-white);
}

html.site-gate-active body {
  visibility: hidden;
}

html.site-gate-active .site-gate {
  visibility: visible;
}

.site-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  color-scheme: light;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-white);
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-gate__panel {
  width: min(100%, 320px);
  text-align: center;
  animation: site-gate-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-gate__logo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 249 / 104;
  height: auto;
  margin: 0 auto 32px;
  background: transparent;
}

.site-gate__logo-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
  transform: scale(0.78);
  transform-origin: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-gate__logo:not(.site-gate__logo--3d) .site-gate__logo-fallback,
.site-gate__logo--3d-fallback .site-gate__logo-fallback,
.site-gate__logo--3d:not(.site-gate__logo--3d-ready) .site-gate__logo-fallback {
  opacity: 1;
  visibility: visible;
}

.site-gate__logo-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: transparent;
}

.site-gate__logo--3d:not(.site-gate__logo--3d-ready) .site-gate__logo-canvas-wrap {
  visibility: hidden;
}

.site-gate__logo--3d-ready .site-gate__logo-fallback {
  opacity: 0;
  visibility: hidden;
}

.site-gate__logo--3d-fallback .site-gate__logo-canvas-wrap {
  visibility: hidden;
}

.site-gate__logo-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}

.site-gate__loader {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
}

.site-gate__progress {
  position: relative;
  width: 76%;
  max-width: 230px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.09);
  box-shadow: inset 0 1px 1px rgba(20, 18, 16, 0.07);
}

.site-gate__progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: #141210;
  transition: width 0.14s linear;
}

.site-gate__percent {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: rgba(20, 18, 16, 0.45);
}

.site-gate.is-revealing {
  pointer-events: none;
  will-change: transform;
  animation: site-gate-curtain 0.72s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.site-gate.is-revealing .site-gate__panel {
  animation: none;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transition:
    opacity 0.28s cubic-bezier(0.4, 0, 1, 1),
    transform 0.28s cubic-bezier(0.4, 0, 1, 1);
}

@keyframes site-gate-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

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

@keyframes site-gate-curtain {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-100%);
  }
}

@media (max-width: 767px) {
  .site-gate {
    padding: 12px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-gate__panel {
    animation: none;
  }
}
