/* The sign-in page. Everything Tailwind's CDN build cannot express as a utility.
 *
 * Loaded after the Tailwind script so these win where they overlap, which matters for the
 * delay-* classes: Tailwind ships those as transition-delay, and here they have to be
 * animation-delay.
 */

/* ---------- Fonts ---------- */

/* The app's typefaces, so the sign-in belongs to the same product as the dashboard behind
 * it. Tailwind's font-sans stack is replaced rather than sat alongside. */
body,
.font-sans {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* Material Symbols, matching the app. Width-clipped so a failed font load degrades to a
 * blank square rather than showing the ligature name as literal text. */
.ms {
  font-family: "Material Symbols Rounded";
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  display: inline-flex;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
}

/* ---------- Glass ---------- */

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---------- Animations ---------- */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-right {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes blur-in {
  from {
    opacity: 0;
    filter: blur(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes scale-up {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* `both` matters. Without it a delayed element paints at full opacity first and then jumps
 * back to its start frame, which reads as a flicker rather than as an entrance. */
.animate-fade-up,
.animate-slide-right,
.animate-blur-in,
.animate-scale-up {
  animation-duration: 600ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
}

.animate-fade-up {
  animation-name: fade-up;
}
.animate-slide-right {
  animation-name: slide-right;
}
.animate-blur-in {
  animation-name: blur-in;
}
.animate-scale-up {
  animation-name: scale-up;
}

/* 100 to 1200. Tailwind's own delay-* utilities set transition-delay, so these are declared
 * here and loaded after the CDN script to take precedence. */
.delay-100 {
  animation-delay: 100ms;
}
.delay-200 {
  animation-delay: 200ms;
}
.delay-300 {
  animation-delay: 300ms;
}
.delay-400 {
  animation-delay: 400ms;
}
.delay-500 {
  animation-delay: 500ms;
}
.delay-600 {
  animation-delay: 600ms;
}
.delay-700 {
  animation-delay: 700ms;
}
.delay-800 {
  animation-delay: 800ms;
}
.delay-900 {
  animation-delay: 900ms;
}
.delay-1000 {
  animation-delay: 1000ms;
}
.delay-1100 {
  animation-delay: 1100ms;
}
.delay-1200 {
  animation-delay: 1200ms;
}

/* The pulsing Live dot keeps pulsing, so it must not inherit the entrance delays above. */
.animate-ping {
  animation-delay: 0ms;
  animation-fill-mode: none;
}

@media (prefers-reduced-motion: reduce) {
  .animate-fade-up,
  .animate-slide-right,
  .animate-blur-in,
  .animate-scale-up,
  .animate-ping {
    animation: none !important;
    opacity: 1;
    filter: none;
    transform: none;
  }
}

/* The Spline scene is decorative and must never intercept a click meant for the form. */
.hue-rotate-lockin iframe {
  pointer-events: none;
}

/* No hue rotation. Checked in the browser: the scene ships cyan through violet, which is
 * already LockIn's palette. The reference's hue-rotate-90 sent it pink and 190deg sent it
 * cream; both fought the blue the rest of the product uses. The right filter here is none. */
.hue-rotate-lockin {
  filter: none;
}

/* ---------- Loader ----------
 *
 * Written here rather than reusing app.css, because this page does not load app.css. It also
 * has a job the app pages do not: covering the moment before Tailwind's CDN arrives, when the
 * markup would otherwise paint completely unstyled.
 */

.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #f1f5fd;
  transition: opacity 260ms ease-out, visibility 260ms;
}

.loader img {
  width: 80px;
  height: 80px;
  display: block;
}

.loader-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #9aa1b9;
  margin: 0;
}

/* `visibility` as well as `opacity`, or the finished overlay keeps swallowing clicks. */
.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
