/* usestop loader — aperture iris open reveal
   Owns: /loader overlay, stop wordmark shutter press, amber dot radial expand.
   Lives above landing content at z-index 99999. Cleaned up after ~1.1s. */

.stop-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0A0908;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  contain: strict;
  pointer-events: auto;
  transition: opacity 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stop-loader[data-state="reveal"] {
  pointer-events: none;
}
.stop-loader[data-state="done"] {
  opacity: 0;
  pointer-events: none;
}

.stop-loader .wordmark {
  font-family: 'Fraunces', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-variation-settings: 'opsz' 144, 'wonk' 30, 'wght' 700;
  font-size: clamp(64px, 14vw, 180px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #F2EFE6;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  position: relative;
  transform-origin: center;
  will-change: transform, filter;
}
/* Wordmark shutter press only fires when the loader hits the press state */
.stop-loader[data-state="press"] .wordmark,
.stop-loader[data-state="iris"] .wordmark,
.stop-loader[data-state="reveal"] .wordmark {
  animation: stop-loader-shutter 350ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stop-loader .dot {
  display: inline-block;
  width: 0.22em;
  height: 0.22em;
  border-radius: 50%;
  background: #FFB43D;
  margin-left: 0.02em;
  align-self: center;
  box-shadow: 0 0 24px rgba(255, 180, 61, 0.55);
  will-change: transform;
  transform: scale(1);
  transition: box-shadow 200ms ease-out;
  position: relative;
}
.stop-loader[data-state="press"] .dot {
  box-shadow: 0 0 48px rgba(255, 180, 61, 0.9);
}

/* The iris: a radial amber disc that fills the viewport as the shutter opens.
   Pinned to the dot's centre, scales up to cover the whole screen. */
.stop-loader .iris {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFB43D 0%, #FF8A00 55%, #FF8A00 100%);
  transform: translate(-50%, -50%) scale(0);
  transform-origin: center;
  pointer-events: none;
  box-shadow: 0 0 60px rgba(255, 180, 61, 0.55);
  will-change: transform;
  mix-blend-mode: normal;
}
.stop-loader[data-state="iris"] .iris {
  animation: stop-loader-iris 900ms cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

@keyframes stop-loader-shutter {
  0%   { transform: scale(1);   filter: none; }
  45%  { transform: scale(0.92); filter: brightness(1.12); }
  70%  { transform: scale(1.04); filter: brightness(0.9); }
  100% { transform: scale(1);   filter: none; }
}

@keyframes stop-loader-iris {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  65%  { transform: translate(-50%, -50%) scale(120); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(180); opacity: 0; }
}

/* Reduced motion: instant removal, no animation */
@media (prefers-reduced-motion: reduce) {
  .stop-loader { display: none !important; }
}

/* Fallback if JS is disabled or fails: fade the overlay out after the full show runs.
   Only kicks in if JS never sets data-state to 'done' to trigger the faster transition path. */
@keyframes stop-loader-fallback-fade {
  0%, 90% { opacity: 1; }
  100%    { opacity: 0; visibility: hidden; }
}
.stop-loader {
  animation: stop-loader-fallback-fade 3500ms linear 3500ms forwards;
}
