:root {
  color: #fff;
  background: #000;
  font-family: Rajdhani, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  animation: gate-fade-in 300ms ease-out both;
}

.access-gate__background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.access-gate__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at center, rgb(0 0 0 / 38%), rgb(0 0 0 / 86%));
  pointer-events: none;
}

.access-gate__video {
  display: block;
  width: 100%;
  height: 100%;
  filter: blur(7px);
  object-fit: cover;
  transform: scale(1.02);
}

.access-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 28rem;
  padding: 2rem;
  margin: 0 1rem;
  animation: card-enter 600ms 200ms cubic-bezier(.22, 1, .36, 1) both;
}

.access-card__header {
  margin-bottom: 2rem;
  text-align: center;
}

.access-card__logo-wrap {
  display: inline-flex;
  width: 5rem;
  height: 5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: logo-enter 500ms 400ms ease-out both;
}

.access-card__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgb(255 255 255 / 30%));
}

.access-card h1 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-family: Rajdhani, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 2.5rem;
  text-transform: uppercase;
}

.access-card__header p {
  margin: 0;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1rem;
  text-transform: uppercase;
}

.access-form {
  position: relative;
}

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

.access-form__field {
  position: relative;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  border-radius: 0;
  background: rgb(0 0 0 / 40%);
  transition: border-color 300ms ease, background-color 300ms ease;
}

.access-form__field:hover {
  border-color: rgb(255 255 255 / 20%);
}

.access-form__field:focus-within {
  border-color: rgb(239 68 68 / 50%);
  background: #141414;
}

.access-form__field.is-error {
  border-color: #ef4444;
  background: rgb(69 10 10 / 30%);
}

.access-form input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 1rem 1.5rem;
  color: #fff;
  font-family: Rajdhani, sans-serif;
  font-size: 1.125rem;
  letter-spacing: 0.2em;
  line-height: 1.75rem;
  text-align: center;
  text-transform: uppercase;
}

.access-form input::placeholder {
  color: #6b7280;
  opacity: 1;
  text-transform: uppercase;
}

.access-form__alert {
  position: absolute;
  top: 50%;
  right: 1rem;
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: #ef4444;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform: translateY(-50%);
}

.access-form__field.is-error .access-form__alert {
  display: block;
  animation: error-shake 400ms ease both;
}

.access-form button {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  margin-top: 0.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(to right, #dc2626, #991b1b);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5rem;
  text-transform: uppercase;
  transition: filter 150ms ease, opacity 150ms ease, transform 120ms ease;
}

.access-form button:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.access-form button:active {
  filter: brightness(0.9);
  transform: scale(0.98);
}

.access-form button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.access-form button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.access-form__arrow {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 150ms ease;
}

.access-form button:hover .access-form__arrow {
  transform: translateX(0.25rem);
}

.access-form__spinner {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgb(255 255 255 / 35%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.access-form.is-loading .access-form__arrow {
  display: none;
}

.access-form.is-loading .access-form__spinner {
  display: block;
}

#access-status {
  position: absolute;
  right: 0;
  bottom: -2rem;
  left: 0;
  min-height: 1.25rem;
  margin: 0;
  color: #ef4444;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  line-height: 1.25rem;
  text-align: center;
}

.access-card__privy {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
  opacity: 0;
  animation: privy-enter 300ms 600ms ease-out forwards;
}

.access-card__privy img {
  width: auto;
  height: 1.5rem;
  object-fit: contain;
}

.access-card__corner {
  position: absolute;
  width: 2rem;
  height: 2rem;
  border-color: rgb(255 255 255 / 20%);
}

.access-card__corner--top {
  top: -1rem;
  left: -1rem;
  border-top: 2px solid;
  border-left: 2px solid;
  border-top-left-radius: 0.5rem;
}

.access-card__corner--bottom {
  right: -1rem;
  bottom: -1rem;
  border-right: 2px solid;
  border-bottom: 2px solid;
  border-bottom-right-radius: 0.5rem;
}

@keyframes gate-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes privy-enter {
  from { opacity: 0; }
  to { opacity: 0.5; }
}

@keyframes error-shake {
  0%, 100% { transform: translate(0, -50%); }
  20%, 60% { transform: translate(-10px, -50%); }
  40%, 80% { transform: translate(10px, -50%); }
}

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

@media (max-width: 420px) {
  .access-card {
    padding: 2rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
