/* The door: pure black, the logo, one field. Nothing else is served yet. */

:root {
  --ink: #f1ece5;
  --ink-dim: #8d857c;
  --ink-faint: #5d5751;
  --ember: #d96a33;
  --ember-soft: #f2a970;
  --err: #e2684a;
  --field: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html,
body { height: 100%; }

body {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 2rem 1.25rem;
  color: var(--ink);
  background: #000;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

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

.gate {
  width: 100%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 7vh, 3.5rem);
  animation: settle 1.1s var(--ease) both;
}

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

.gate__logo {
  width: min(74vw, 19rem);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 46px rgba(217, 106, 51, 0.18));
  animation: breathe 7s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.94; }
  50% { opacity: 1; }
}

.gate__form {
  width: 100%;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.gate__input {
  width: 100%;
  appearance: none;
  font: inherit;
  font-size: 1rem;
  text-align: center;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.gate__input::placeholder { color: var(--ink-faint); }

.gate__input:focus {
  outline: none;
  border-color: rgba(217, 106, 51, 0.6);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(217, 106, 51, 0.12);
}

.gate__input::selection { background: rgba(217, 106, 51, 0.35); }

.gate__button {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1.9rem;
  cursor: pointer;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s var(--ease);
}

.gate__button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.gate__button:active { transform: scale(0.97); }
.gate__button:disabled { opacity: 0.5; cursor: default; transform: none; }

.gate__button:focus-visible,
.gate__input:focus-visible {
  outline: 2px solid var(--ember-soft);
  outline-offset: 3px;
}

.gate__message {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.84rem;
  color: var(--ink-faint);
  text-align: center;
  transition: color 0.4s var(--ease);
}

.gate__message.is-wrong { color: var(--err); }
.gate__message.is-busy { color: var(--ink-dim); }
.gate__message--noscript { position: fixed; bottom: 1.5rem; left: 0; right: 0; }

.gate.is-wrong { animation: shake 0.45s ease-in-out; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  60% { transform: translateX(8px); }
  80% { transform: translateX(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
