/* The access-code door. Its own sheet because style.css is being rewritten by
   several sessions at once, and because this is temporary — when the code comes
   off, this file and js/gate.js are deleted together and nothing else changes. */
#gate {
  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center;
  background: #06080a;
  font-family: var(--ui, system-ui, sans-serif);
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
#gate.gate-open { opacity: 0; pointer-events: none; }

.gate-panel { width: min(420px, calc(100vw - 48px)); text-align: left; }

#gate h1 {
  margin: 0;
  font-family: var(--display, inherit);
  font-size: clamp(38px, 6vw, 58px);
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: #eef1f3;
}
#gate h1 em { display: block; font-style: normal; color: #e0a43c; }

.gate-note {
  margin: 16px 0 26px;
  font-size: 13px; line-height: 1.5;
  color: #a7b0b6;
}

.gate-label {
  display: block;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #78838a;
  margin-bottom: 8px;
}

.gate-input {
  width: 100%;
  background: #0e1216;
  border: 1px solid #2a3238;
  border-radius: 4px;
  color: #eef1f3;
  font-family: var(--display, inherit);
  /* Wide tracking so four digits read as a code rather than as a number. */
  font-size: 30px; letter-spacing: 0.42em; text-indent: 0.42em;
  padding: 14px 16px;
  outline: none;
  transition: border-color 140ms ease;
}
.gate-input:focus { border-color: #e0a43c; }
.gate-input::placeholder { color: #3a444b; letter-spacing: 0.42em; }

.gate-error {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 12px;
  color: #e2725b;
}

.gate-go {
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  border: 0; border-radius: 4px;
  background: #e0a43c;
  color: #10141a;
  font-family: var(--display, inherit);
  font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  transition: filter 140ms ease;
}
.gate-go:hover, .gate-go:focus-visible { filter: brightness(1.08); }

/* A short shake on a wrong code. Two cycles, small amplitude — enough to read as
   a refusal without becoming a party trick on a screen you see once. */
#gate.gate-wrong .gate-panel { animation: gateShake 380ms cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes gateShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  30%, 70% { transform: translate3d(4px, 0, 0); }
  50%      { transform: translate3d(-4px, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  #gate, #gate.gate-wrong .gate-panel { transition: none; animation: none; }
}
