:root {
  --bg: #07090c;
  --panel: rgba(18, 22, 28, 0.72);
  --border: rgba(110, 231, 183, 0.22);
  --text: #e8eef4;
  --muted: #8b97a6;
  --accent: #6ee7b7;
  --accent-2: #38bdf8;
  --magenta: #f472b6;
  --danger: #fb7185;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Figtree", sans-serif;
  --font-scale: 1;
  --scrollbar-size: 10px;
  --scrollbar-thumb: rgba(148, 163, 184, 0.35);
  --scrollbar-thumb-hover: rgba(110, 231, 183, 0.55);
  --scrollbar-track: rgba(18, 22, 28, 0.5);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

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

html {
  font-size: calc(16px * var(--font-scale, 1));
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

.aurora {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(40% 35% at 20% 20%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(35% 40% at 80% 30%, rgba(244, 114, 182, 0.14), transparent 55%),
    radial-gradient(45% 40% at 50% 85%, rgba(110, 231, 183, 0.16), transparent 60%),
    linear-gradient(160deg, #05070a, #0c1218 50%, #070a0e);
  animation: aurora-drift 18s ease-in-out infinite alternate;
  z-index: 0;
}

.grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 231, 183, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  animation: grid-pulse 8s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

.scan {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(110, 231, 183, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 220%;
  animation: scan 7s linear infinite;
  z-index: 2;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  gap: 2.25rem;
  overflow: auto;
}

.brand {
  text-align: center;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto 1.25rem;
}

.logo {
  width: 132px;
  height: 132px;
  display: block;
  border-radius: 22%;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.35))
    drop-shadow(0 0 28px rgba(244, 114, 182, 0.22));
  animation: logo-glow 3.2s ease-in-out infinite;
}

.logo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 28%;
  border: 1px solid rgba(110, 231, 183, 0.35);
  animation: ring 3.6s ease-out infinite;
  pointer-events: none;
}

.logo-ring.delay {
  animation-delay: 1.2s;
  border-color: rgba(56, 189, 248, 0.3);
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  background: linear-gradient(120deg, #e8eef4 10%, #6ee7b7 45%, #38bdf8 70%, #f472b6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 6s linear infinite;
}

.tagline {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.gate {
  width: min(400px, 100%);
  padding: 1.5rem;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: rise 1s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.field input {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(7, 10, 14, 0.75);
  color: var(--text);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font: 500 1rem/1.2 var(--font-body);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.field input::placeholder {
  color: #5d6978;
}

.field input:focus {
  border-color: rgba(110, 231, 183, 0.65);
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.14), 0 0 28px rgba(56, 189, 248, 0.12);
  transform: translateY(-1px);
}

.enter {
  position: relative;
  margin-top: 1rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font: 600 0.95rem/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #041016;
  background: linear-gradient(120deg, #6ee7b7, #38bdf8 55%, #a78bfa);
  background-size: 180% 100%;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, filter 0.2s ease, background-position 0.4s ease;
}

.enter:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  background-position: 100% 0;
}

.enter:active {
  transform: translateY(1px);
}

.enter:disabled {
  opacity: 0.65;
  cursor: wait;
}

.enter-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 3.8s ease-in-out infinite;
}

.status {
  min-height: 1.25rem;
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.status.error {
  color: var(--danger);
  animation: shake 0.4s ease;
}

@keyframes aurora-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.05); }
}

@keyframes grid-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.9; }
}

@keyframes scan {
  from { background-position: 0 -40%; }
  to { background-position: 0 140%; }
}

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.3)) drop-shadow(0 0 22px rgba(244, 114, 182, 0.18)); }
  50% { filter: drop-shadow(0 0 26px rgba(110, 231, 183, 0.45)) drop-shadow(0 0 36px rgba(56, 189, 248, 0.28)); }
}

@keyframes ring {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.28); opacity: 0; }
}

@keyframes sheen {
  to { background-position: 200% center; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (max-width: 520px) {
  .logo-wrap,
  .logo {
    width: 104px;
    height: 104px;
  }

  .wordmark {
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }
}
