/* ============================================================
   StratoSense — motion layer

   Two things:
     · a brand loader shown once per session
     · a damped scroll, Framer-style, plus a thin progress rail

   SAFETY: the loader covers the whole page, so a loader that fails
   to dismiss is a blank website. It therefore dismisses three
   independent ways:
       1. JavaScript removes it when the page finishes loading
       2. a pure-CSS animation fades it out at 2.6s even if that
          JavaScript never runs at all
       3. <noscript> hides it outright when scripting is off
   Only the first is the normal path. The other two exist so the
   failure mode is "no loader" rather than "no website".
   ============================================================ */

/* ══════════════ LOADER ══════════════ */
.ss-load{
  position:fixed;inset:0;z-index:999;
  display:grid;place-items:center;
  background:#0B0B0B;
  /* failsafe: fades itself out even with no JS at all */
  animation:ss-load-failsafe .5s var(--ease,cubic-bezier(.22,.61,.36,1)) 2.6s forwards;
}
.ss-load[hidden]{display:none}
.ss-load.is-out{
  animation:none;
  opacity:0;visibility:hidden;
  transition:opacity .55s var(--ease),visibility 0s linear .55s;
}
@keyframes ss-load-failsafe{
  to{opacity:0;visibility:hidden;pointer-events:none}
}

.ss-load-in{
  display:flex;flex-direction:column;align-items:center;gap:26px;
  width:min(280px,72vw);
}

/* the mark draws itself in */
.ss-load-mark{width:64px;height:58px;overflow:visible}
.ss-load-mark .arc{
  fill:none;stroke:#FFC107;stroke-width:3.6;stroke-linecap:round;
  stroke-dasharray:60;stroke-dashoffset:60;
  animation:ss-draw .9s var(--ease) forwards;
}
.ss-load-mark .arc.two{animation-delay:.12s;stroke-dasharray:34;stroke-dashoffset:34}
.ss-load-mark .body{fill:#E5E5E5;opacity:0;animation:ss-fade .5s ease .5s forwards}
.ss-load-mark .bar{fill:#FFC107;opacity:0;animation:ss-fade .5s ease .66s forwards}
@keyframes ss-draw{to{stroke-dashoffset:0}}
@keyframes ss-fade{to{opacity:1}}

/* progress rail */
.ss-load-rail{
  width:100%;height:2px;background:#242830;border-radius:2px;overflow:hidden;
}
.ss-load-bar{
  display:block;height:100%;width:0;background:#FFC107;border-radius:2px;
  transition:width .35s var(--ease);
}

.ss-load-meta{
  display:flex;align-items:baseline;justify-content:space-between;
  width:100%;
  font-family:var(--fm,ui-monospace,Consolas,monospace);
  font-size:.62rem;letter-spacing:.16em;text-transform:uppercase;color:#6C737B;
}
.ss-load-meta .pct{color:#FFC107;font-variant-numeric:tabular-nums}

/* Stop the page scrolling underneath the loader, but never leave the
   lock on: it is removed with the loader, and the failsafe below
   releases it on the same timing in case JavaScript never does. */
html.ss-loading,html.ss-loading body{overflow:hidden}
html.ss-loading{animation:ss-unlock 0s linear 3.1s forwards}
@keyframes ss-unlock{to{overflow:auto}}

/* ══════════════ SCROLL PROGRESS RAIL ══════════════ */
.ss-prog{
  position:fixed;top:0;left:0;right:0;height:2px;z-index:200;
  background:transparent;pointer-events:none;
}
.ss-prog span{
  display:block;height:100%;width:0;
  background:linear-gradient(90deg,#FFC107,#E8A317);
  transform-origin:0 50%;
}

/* ══════════════ DAMPED SCROLL ══════════════
   The scroller drives real window scroll position (it does not
   transform a wrapper), so position:fixed, IntersectionObserver,
   anchor links and the scrollbar all keep working normally. The
   only thing this class does is turn off the native smooth-anchor
   behaviour, which would otherwise fight the damping. */
html.ss-damped{scroll-behavior:auto}

/* ══════════════ REDUCED MOTION ══════════════
   No damping, no drawing, no counter theatre. The loader still
   appears briefly but does not animate. */
@media (prefers-reduced-motion:reduce){
  .ss-load{animation-delay:.2s;animation-duration:.01ms}
  .ss-load-mark .arc,
  .ss-load-mark .body,
  .ss-load-mark .bar{animation-duration:.01ms;animation-delay:0s;stroke-dashoffset:0;opacity:1}
  .ss-load-bar{transition:none}
  .ss-load.is-out{transition-duration:.01ms}
  .ss-prog span{transition:none}
}

/* Repeat navigation within the same session: the head snippet marks
   the document and the loader never paints at all, rather than
   appearing for a frame and being torn down by script. */
html.ss-seen .ss-load{display:none}
