/* GradePro Loader — Text-only Apple-style (v7.4)
   - Title glides into center (no drifting)
   - Faint presence first (not from nowhere)
   - Same gradient as header via --gp-title-gradient
*/

:root{
  --gp-title-gradient: linear-gradient(90deg,
    #507FD8 0%,
    #5D8FDA 28%,
    #7F8FB6 60%,
    #8A94A6 100%
  );
}

.gp-loader{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;

  background: rgba(29,29,31,0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition: opacity 520ms cubic-bezier(0.2,0.8,0.2,1),
              visibility 0ms linear 520ms;
}

.gp-loader[aria-hidden="true"],
.gp-loader.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gp-loader__veil{
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

.gp-loader__panel{
  width: auto;
  max-width: min(92vw, 680px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  justify-items: center;
  text-align: center;
}

.gp-logo,
.gp-loader__subtitle,
.gp-loader__footer,
.gp-loader__microline,
.gp-microline__bar,
.gp-microline__glow,
.gp-loader__hint,
.gp-loader__panel::before,
.gp-loader__panel::after{
  display: none !important;
}

.gp-loader__title{
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Inter", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;

  font-size: clamp(30px, 4.2vw, 44px);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;

  background: var(--gp-title-gradient);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  /* present but subtle + offset */
  opacity: 0.22;
  filter: blur(1.2px) saturate(1.04) contrast(1.02);

  translate: 0 26px;
  transform: translateZ(0);

  will-change: translate, filter, opacity, background-position;
}

.gp-loader[aria-hidden="false"] .gp-loader__title,
.gp-loader.is-visible .gp-loader__title{
  animation:
    gpGlideToCenter 980ms cubic-bezier(0.16,1,0.3,1) both,
    gpGradientPan 2600ms cubic-bezier(0.4,0.0,0.2,1) 1020ms infinite;
}

@keyframes gpGlideToCenter{
  0%{
    opacity: 0.22;
    translate: 0 26px;
    filter: blur(1.2px) saturate(1.04) contrast(1.02);
  }
  55%{
    opacity: 0.92;
    translate: 0 -2px;
    filter: blur(0.2px) saturate(1.04) contrast(1.02);
  }
  100%{
    opacity: 1;
    translate: 0 0;
    filter: blur(0) saturate(1.04) contrast(1.02);
  }
}

@keyframes gpGradientPan{
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce){
  .gp-loader[aria-hidden="false"] .gp-loader__title,
  .gp-loader.is-visible .gp-loader__title{ animation: none; }
  .gp-loader__title{ opacity: 1; translate: 0 0; filter: none; }
}
