/* ==========================================================================
   QZ Preloader
   Ported from the Webflow export (loader-b08319). Self-contained: no jQuery,
   GSAP or webflow.js dependency. The `Interdisplay` @font-face is intentionally
   omitted here because it is already declared in
   quantum-zenith-capital-website.css.
   ========================================================================== */

/* --- Layout / component styles (from loader-b08319.webflow.css) ----------- */

.qz-loader {
  /* Sits above the nav (900) and popups (950); see BaseLayout z-index stack. */
  z-index: 9999;
  color: #1f1f1f;
  width: 100vw;
  height: 100vh;
  font-family: Interdisplay, Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 150%;
  transition: opacity .2s;
  position: fixed;
  inset: 0%;
  --prog: 0;
}

/* Reclaim <p> typography from the host site's global element rules.
   quantum-zenith-capital-website.css / components.css define a bare
   `p { color:#fff; font-size:20px; margin-bottom:10px }` that otherwise leaks
   onto the loader's LOADING text and percentage (white-on-white, wrong size).
   `.qz-loader p` (0,1,1) outranks the bare `p` (0,0,1), so the loader's own
   inheritance (.qz-loader color/size, .qzl-progress 64px) wins again. */
.qz-loader p {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: normal;
  margin: 0;
}

/* Hidden state once the loader has finished and removed itself from flow. */
.qz-loader.hide {
  opacity: 0;
}

.qz-loader.done {
  display: none;
}

.qz-loader-mask {
  background-color: #fff;
  width: 110%;
  height: 100%;
  transform-origin: center;
}

.qz-loader_maskgroup {
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  grid-template-rows: auto;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  grid-auto-columns: 1fr;
  align-items: center;
  width: 100vw;
  height: 100%;
  display: grid;
}

.qz-loader_maskgroup.collapsing .qz-loader-mask {
  animation: collapse 1s ease-in forwards;
}
.qz-loader_maskgroup.collapsing .qz-loader-mask:nth-child(1) { animation-delay: 0s }
.qz-loader_maskgroup.collapsing .qz-loader-mask:nth-child(2) { animation-delay: 0.3s }
.qz-loader_maskgroup.collapsing .qz-loader-mask:nth-child(3) { animation-delay: 0.6s }
.qz-loader_maskgroup.collapsing .qz-loader-mask:nth-child(4) { animation-delay: 0.9s }
.qz-loader_maskgroup.collapsing .qz-loader-mask:nth-child(5) { animation-delay: 1.2s }

@keyframes collapse {
  to { transform: scaleY(0) }
}

.qz-loader_content {
  grid-column-gap: 16px;
  grid-row-gap: 16px;
  flex-flow: column;
  grid-template-rows: auto auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  display: flex;
  position: absolute;
  inset: 0%;
}

.qzl-loading {
  padding: min(80px, 5vw);
  transition-property: opacity, transform;
  transition-duration: .2s, .5s;
  transition-timing-function: ease, cubic-bezier(.215, .61, .355, 1);
}

.qzl-loading.hide {
  opacity: 0;
  transform: translate(0, 100%);
}

.qzl-loader_bar {
  background-color: #d72329;
  width: calc(var(--prog) * 1%);
  height: 8px;
  margin-top: 10px;
  transition: width .2s;
}

.qzl-content {
  grid-column-gap: 40px;
  grid-row-gap: 40px;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
}

.qzl-progress {
  color: #d9d9d9;
  font-size: 64px;
  line-height: 100%;
  position: relative;
  overflow: hidden;
}

/* Red fill that wipes up the percentage text as --prog climbs. */
.qzl-progress > p::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #D8232A;
  clip-path: inset(calc(100% - (var(--prog) * 1%)) 0 0 0);
}

.qzl-progress_p {
  font-variant-numeric: tabular-nums;
}

.qzl-logo {
  flex: 1;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 25vh;
  display: flex;
}

.qzl-logo_inner {
  grid-column-gap: 72px;
  grid-row-gap: 72px;
  background-color: #fff;
  justify-content: center;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: opacity .5s cubic-bezier(.165, .84, .44, 1);
  display: flex;
  transform: translate(0, 24px);
}

.qzl-logo_inner.hide {
  opacity: 0;
}

.qzl-logoimg {
  width: 174px;
  height: 64px;
}

.qzl-img {
  object-fit: cover;
  height: 100%;
}

/* --- Odometer ------------------------------------------------------------- */

.qzl-odometer {
  --start: rgba(255, 255, 255, 0.6);
  --end: rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}

/* Top + bottom fades that frame the rolling list. */
.qzl-odometer::before {
  content: '';
  height: 32px;
  width: 100%;
  background: linear-gradient(to bottom, var(--start), var(--end));
  position: absolute;
  top: 0%;
  left: 0%;
  right: 0%;
  z-index: 1;
}
.qzl-odometer::after {
  content: '';
  height: 32px;
  width: 100%;
  background: linear-gradient(to bottom, var(--end), var(--start));
  position: absolute;
  bottom: 0%;
  left: 0%;
  right: 0%;
}

.qzl-odometer_inner {
  will-change: transform;
  --start: 0px;
  transform: translateY(var(--start));
  scroll-snap-type: y mandatory;
  height: 140px;
  padding-top: 32px;
  padding-bottom: 32px;
  position: relative;
}

.qzl-odometer_inner .qzl-odo_sub[data-current] {
  color: hsla(358, 72%, 49%, 1);
}

.qzl-odometer_inner.rolling {
  --dist: 0px;
  animation: roll 4s ease-in-out infinite;
}

@keyframes roll {
  0%   { transform: translateY(var(--start)) }
  50%  { transform: translateY(calc(var(--start) + var(--dist))) }
  100% { transform: translateY(calc(var(--start) + var(--dist))) }
}

.qzl-odo_sub {
  text-transform: uppercase;
  scroll-snap-align: center;
  scroll-snap-stop: normal;
  justify-content: flex-start;
  align-items: center;
  height: 72px;
  scroll-margin-top: 0;
  font-size: 40px;
  line-height: 56px;
  transition-property: color;
  transition-duration: .2s;
  transition-timing-function: ease;
  display: flex;
}

/* --- Responsive ----------------------------------------------------------- */

@media screen and (max-width: 767px) {
  .qzl-progress {
    font-size: 48px;
  }

  .qzl-logo_inner {
    flex-flow: column;
  }

  .qzl-odo_sub {
    justify-content: center;
    align-items: center;
    font-size: 24px;
  }
}

/* --- Reduced motion: skip straight to a static, dismissed state ----------- */

@media (prefers-reduced-motion: reduce) {
  .qzl-odometer_inner.rolling {
    animation: none;
  }
  .qz-loader_maskgroup.collapsing .qz-loader-mask {
    animation-duration: .01ms;
  }
}
