/* ============================================================
   LIMITLESS Status — access gate ("observatory entrance").
   Ported from limitless-platform/src/app/login/login.module.css
   (React CSS module -> plain classes, `lg-` prefixed). Dark,
   neon-purple, self-contained: explicit dark colours + brand vars
   declared here so it renders identically with no app theme. No
   inline scripts, no remote assets — CSP-safe.
   ============================================================ */

@font-face {
  font-family: 'Satoshi';
  src: url('/fonts/Satoshi-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand-neon (purple) — mirrors limitless-platform globals.css */
  --brand-neon-rgb: 139 92 255;   /* primary brand purple (n500) */
  --brand-neon-300: 185 138 255;
  --brand-neon-500: 139 92 255;
  --brand-neon-700: 90 51 224;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #05030a;
  color: #f4f1fb;
}

.lg-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lg-root {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 50% -10%, rgba(var(--brand-neon-rgb), 0.10) 0%, transparent 55%),
    radial-gradient(90% 90% at 50% 120%, rgba(var(--brand-neon-rgb), 0.08) 0%, transparent 60%),
    #05030a;
  color: #f4f1fb;
  isolation: isolate;
}

/* Drifting aurora blobs */
.lg-aurora,
.lg-aurora-two {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.5;
  z-index: -2;
  pointer-events: none;
  will-change: transform;
}

.lg-aurora {
  width: 46vmax;
  height: 46vmax;
  top: -16vmax;
  left: -10vmax;
  background: radial-gradient(circle at center, rgba(var(--brand-neon-rgb), 0.55), transparent 65%);
  animation: lg-drift 26s ease-in-out infinite;
}

.lg-aurora-two {
  width: 40vmax;
  height: 40vmax;
  bottom: -16vmax;
  right: -8vmax;
  background: radial-gradient(circle at center, rgba(120, 86, 255, 0.45), transparent 65%);
  animation: lg-drift 32s ease-in-out infinite reverse;
}

/* Faint "OS" grid */
.lg-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--brand-neon-rgb), 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--brand-neon-rgb), 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(75% 60% at 50% 45%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(75% 60% at 50% 45%, black 0%, transparent 80%);
}

/* Glass panel */
.lg-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 56px 42px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 26px;
  border: 1px solid rgba(var(--brand-neon-rgb), 0.22);
  background: linear-gradient(180deg, rgba(22, 16, 38, 0.78) 0%, rgba(10, 7, 20, 0.86) 100%);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 60px -12px rgba(var(--brand-neon-rgb), 0.35);
  animation: lg-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Hairline sheen along the top edge */
.lg-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-neon-rgb), 0.8), transparent);
}

/* Rotating infinity logo + halo */
.lg-logo-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.lg-halo {
  position: absolute;
  inset: -18px;
  border-radius: 9999px;
  background: radial-gradient(circle at center, rgba(var(--brand-neon-rgb), 0.45) 0%, transparent 68%);
  filter: blur(6px);
  animation: lg-pulse-halo 3.6s ease-in-out infinite;
  z-index: 0;
}

.lg-logo {
  position: relative;
  z-index: 1;
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 9999px;
  filter: drop-shadow(0 0 14px rgba(var(--brand-neon-rgb), 0.55));
}

.lg-wordmark {
  font-family: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  line-height: 1;
  margin: 0;
  background: linear-gradient(
    90deg,
    rgb(var(--brand-neon-300)) 0%,
    #ffffff 50%,
    rgb(var(--brand-neon-300)) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: lg-shimmer 9s ease-in-out infinite;
}

.lg-tagline {
  margin: 16px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.5;
  color: rgba(var(--brand-neon-rgb), 0.82);
}

.lg-form {
  width: 100%;
  margin-top: 42px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lg-field {
  position: relative;
  display: flex;
  align-items: center;
}

.lg-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: rgba(var(--brand-neon-rgb), 0.7);
  pointer-events: none;
}

.lg-input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #f4f1fb;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--brand-neon-rgb), 0.22);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.lg-input::placeholder {
  color: rgba(244, 241, 251, 0.32);
  letter-spacing: 0.04em;
}

.lg-input:focus {
  border-color: rgba(var(--brand-neon-rgb), 0.7);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(var(--brand-neon-rgb), 0.14), 0 0 24px -4px rgba(var(--brand-neon-rgb), 0.5);
}

.lg-panel.lg-rejected .lg-input {
  border-color: rgba(244, 63, 94, 0.65);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.lg-submit {
  position: relative;
  height: 52px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(
    130deg,
    rgb(var(--brand-neon-700)) 3%,
    rgb(var(--brand-neon-500)) 52%,
    rgb(var(--brand-neon-700)) 97%
  );
  box-shadow: 0 10px 30px -8px rgba(var(--brand-neon-rgb), 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: transform 0.18s ease, box-shadow 0.25s ease, filter 0.25s ease, opacity 0.2s ease;
}

.lg-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px -8px rgba(var(--brand-neon-rgb), 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  filter: brightness(1.06);
}

.lg-submit:active:not(:disabled) {
  transform: translateY(0);
}

.lg-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

.lg-error {
  min-height: 16px;
  margin: 2px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgb(251, 113, 133);
}

@keyframes lg-rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes lg-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(6%, 4%) scale(1.08);
  }
}

@keyframes lg-pulse-halo {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes lg-shimmer {
  0%,
  100% {
    background-position: 200% center;
  }
  50% {
    background-position: 0% center;
  }
}

@keyframes lg-shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(3px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-6px);
  }
  40%,
  60% {
    transform: translateX(6px);
  }
}

.lg-shake {
  animation: lg-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@media (prefers-reduced-motion: reduce) {
  .lg-panel,
  .lg-aurora,
  .lg-aurora-two,
  .lg-halo,
  .lg-wordmark,
  .lg-shake {
    animation: none !important;
  }
}
