/* NURREVER site chrome — branded preloader (U1, United pattern, NURREVER content).
   Colours: white + neon blue + black ONLY. The preloader is an overlay over
   the already-painting page: it can only hide, never block content. A pure-CSS
   failsafe (inline <style> in the patch markup, not here) hides it even if
   preloader.js never runs. Shared chrome tokens — keep in sync with
   menu.css, transitions.css, cursor.css. */
:root {
  --nur-neon: #00BFFF;
  --nur-neon-light: #7DD8FF;
  --nur-neon-deep: #0090FF;
  --nur-chrome-black: #050505;
}

.nur-preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--nur-chrome-black);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  /* JS-driven finish: fade out, then preloader.js sets display: none. */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.nur-preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Scroll lock while the preloader is visible (JS adds the class; if JS
   fails, no lock is ever applied, so the page stays scrollable). */
html.nur-preloader-open,
html.nur-preloader-open body {
  overflow: hidden;
}

.nur-preloader__grid {
  width: min(100vw, 1440px);
  margin: 0 auto;
  padding: 0 4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 3rem;
  align-items: center;
}

/* Left: wordmark + hub list (United .loader-left / .loader-countries). */
.nur-preloader__logo {
  display: block;
  width: 310px;
  max-width: 70vw;
  height: auto;
}
.nur-preloader__label {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  max-width: 26ch;
}
.nur-preloader__hubs {
  margin-top: 2rem;
  font-family: var(--nur-font-heading, "Archivo", Arial, sans-serif);
  /* FIX ROUND 3: the hubs line is now one static "PRATTSBURGH — NEW YORK"
     (no cycling — it is a location label, not a rotating list). Fluid size
     so the full line fits the left column at mid viewports (901–1150px)
     instead of clipping in the 1.5em roll window. */
  font-size: clamp(0.72rem, 1.05vw, 1.05rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nur-neon-light);
}

/* Centre: dotted world map (NURREVER's own /images/dot-map.png) + pulsing
   hub dots (United .loader-map / .loader-map-dot). The map dots are dark, so
   the image is inverted to read as light dots on the black overlay. */
.nur-preloader__map {
  position: relative;
  width: min(520px, 38vw);
}
.nur-preloader__map img {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1);
  opacity: 0.85;
}
.nur-preloader__dot {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--nur-neon);
  box-shadow: 0 0 12px 2px rgba(0, 191, 255, 0.65);
  transform-box: fill-box;
  transform-origin: center;
  /* United's world-wide-dot keyframe, recoloured neon blue. FIX ROUND 3 —
     ROOT CAUSE of re-check FAIL 1 (2026-11-14): the keyframe bottomed at
     scale(0)/opacity 0.25 AND the --delay stagger runs west->east, so at
     any mid-run screenshot the Americas dots (small delays) were at/near
     scale 0 while Europe/Asia dots (large delays, animation not started)
     sat at full scale — North America read as empty although all 31
     positions sit on land (verified against the PNG ink AND the rendered
     map: rendered dot % matches the specified % exactly). The floor is
     now scale 0.6 / opacity 0.7, so every dot stays clearly visible at
     every moment while still pulsing; positions and delays unchanged. */
  animation: nur-world-dot 3s cubic-bezier(0.445, 0.05, 0.55, 0.95) var(--delay, 0s) infinite alternate;
}
@keyframes nur-world-dot {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.6);
    opacity: 0.7;
  }
}

/* Right: 00 -> 100 counter + program ticker (United .loader-progress /
   .loader-service-cms). */
.nur-preloader__right {
  text-align: right;
}
.nur-preloader__count {
  font-family: var(--nur-font-heading, "Archivo", Arial, sans-serif);
  font-weight: 700;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.nur-preloader__count-pct {
  font-size: 0.35em;
  color: var(--nur-neon);
  margin-left: 0.1em;
}
.nur-preloader__ticker {
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.nur-preloader__ticker .nur-roll__item {
  justify-content: flex-end;
}

/* Shared vertical roll (one line visible; JS toggles .is-active).
   v4 REWRITE — ROOT CAUSE of re-check FAIL 1 (2026-11-13): the old
   mechanism slid a flex track by -1.5em steps with a 0.18s transition.
   The geometry was exact — no width/line-height/overflow defect (the
   user's own screenshot shows both rolls clean at 99%) — but the
   ticker steps every 210ms while its transition runs 180ms, so the
   track was IN MOTION 86% of every step: any screenshot — and the eye
   — caught two half-cut lines ("SAAS…" with the previous line sliced
   above it). Shortening the transition (the 0.18s fix) could not fix a
   mechanism whose settle time is a fraction of its step — so the
   MECHANISM changed, not the duration: items are STACKED in the
   window and crossfade (incoming slides up 0.4em while fading in,
   outgoing slides up while fading out). Step intervals (ticker 210ms,
   hubs 380ms) and all lifecycle timing are untouched.
   FIX ROUND 3 — the v4 crossfade still overlapped: during the 0.1s
   transition BOTH labels were visible at once, and the re-check caught
   "SAAS PRODUCTS &" over "LEAN CRM". The mechanism is now SEQUENCED,
   not simultaneous: JS (setRollItem in js/preloader.js) fades the old
   label out FIRST and only activates the new one 110ms later, after
   the 0.1s fade-out has fully completed — two labels are never visible
   at once. The hubs line no longer cycles at all (single static item,
   see .nur-preloader__hubs); only the ticker still rolls. */
.nur-roll {
  position: relative;
  overflow: hidden;
  height: 1.5em;
  line-height: 1.5;
}
.nur-roll__track {
  position: absolute;
  inset: 0;
}
.nur-roll__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 0.1s ease-out, transform 0.1s ease-out;
  will-change: opacity, transform;
}
.nur-roll__item.is-active {
  opacity: 1;
  transform: translateY(0);
}
.nur-roll__item.is-leaving {
  opacity: 0;
  transform: translateY(-0.4em);
}

/* Bottom: neon progress line driven by --load-progress (0..1) + skip hint. */
.nur-preloader__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}
.nur-preloader__bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--nur-neon-deep), var(--nur-neon), var(--nur-neon-light));
  transform: scaleX(var(--load-progress, 0));
  transform-origin: 0 50%;
}
.nur-preloader__skip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 900px) {
  .nur-preloader__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
    text-align: left;
  }
  /* United hides the map on small screens too. */
  .nur-preloader__center {
    display: none;
  }
  .nur-preloader__right {
    text-align: left;
  }
  .nur-preloader__ticker .nur-roll__item {
    justify-content: flex-start;
  }
  .nur-preloader__skip {
    bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nur-preloader,
  .nur-roll__track,
  .nur-roll__item,
  .nur-preloader__dot {
    transition: none;
    animation: none;
  }
  /* preloader.js hides immediately under reduced motion; if it never runs,
     the inline failsafe hides the overlay at once (see patch markup). */
}
