:root {
  color-scheme: dark;
  --bg: #04070b;
  --panel: rgba(2, 10, 14, 0.78);
  --cyan: #5ff4ff;
  --amber: #ffb65c;
  --green: #64f0a4;
  --red: #ff526b;
  --text: #eafcff;
  --muted: #86a6b4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(26, 140, 255, 0.08), transparent 36%),
    linear-gradient(315deg, rgba(255, 182, 92, 0.08), transparent 32%),
    var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(95, 244, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 244, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.04) 0,
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 5px
  );
  opacity: 0.1;
  mix-blend-mode: screen;
}

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

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem) 1.25rem;
}

.access-shell {
  width: min(52rem, 100%);
  position: relative;
  display: grid;
  gap: 1rem;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.core {
  width: min(78vw, 18rem);
  aspect-ratio: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(95, 244, 255, 0.14);
  animation: breathe 5s ease-in-out infinite;
}

.core::before,
.core::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(95, 244, 255, 0.18);
  animation: rotate 18s linear infinite;
}

.core::after {
  inset: 27%;
  border-color: rgba(255, 182, 92, 0.18);
  animation-duration: 11s;
  animation-direction: reverse;
}

.identity {
  width: 100%;
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0;
  justify-content: center;
  justify-items: center;
  text-align: center;
  color: var(--text);
}

.identity span,
.identity strong {
  display: block;
  color: var(--text);
  font-size: 3.2rem;
  font-weight: 690;
  line-height: 0.95;
  letter-spacing: 0.04rem;
  text-align: center;
}

.identity:has(span) strong {
  display: none;
}

.access-form {
  width: min(21rem, 100%);
  position: relative;
  z-index: 2;
  justify-self: center;
}

.password-wrap {
  position: relative;
  isolation: isolate;
}

.password-wrap::before,
.password-wrap::after {
  display: none;
}

.password-wrap::before {
  right: calc(100% + 0.8rem);
}

.password-wrap::after {
  left: calc(100% + 0.8rem);
  transform: rotate(180deg);
}

.password-input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 2.65rem;
  border: 1px solid rgba(95, 244, 255, 0.38);
  border-radius: 3px;
  padding: 0 0.85rem;
  background: var(--panel);
  color: var(--text);
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.14rem;
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.password-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.14rem;
  line-height: 2.65rem;
  overflow: hidden;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

.password-input::placeholder {
  color: rgba(234, 252, 255, 0.38);
}

.password-input:focus {
  border-color: var(--amber);
}

.access-form.denied .password-input {
  border-color: var(--red);
  animation: shake 220ms ease;
}

.access-form.granted .password-input {
  border-color: var(--green);
  color: var(--green);
}

.access-form.pending .password-input {
  border-color: rgba(95, 244, 255, 0.5);
}

.password-wrap.masking.has-password .password-input {
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--text);
}

.password-wrap.masking.has-password .password-mask {
  display: flex;
}

.access-form.granted .password-mask {
  color: var(--green);
}

.status {
  display: none;
}

@keyframes breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.72;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.025);
    opacity: 0.86;
  }
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(-0.5rem);
  }

  70% {
    transform: translateX(0.5rem);
  }
}

@media (max-width: 42rem) {
  .access-shell {
    width: 100%;
  }

  .identity span,
  .identity strong {
    font-size: 2.55rem;
    letter-spacing: 0.04rem;
  }

  .access-form {
    width: min(20rem, 100%);
  }

  .password-input {
    letter-spacing: 0.1rem;
  }

  .password-mask {
    letter-spacing: 0.1rem;
  }
}
