/* Site-wide password gate. Rendered in place of the page content on every
   page until the password is accepted, so it is never dismissible. */

.gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 48px);
  /* The panel is taller than a short landscape viewport, so it must scroll
     rather than overflow off-screen. */
  overflow-y: auto;
  background: rgba(10, 8, 20, .82);
  backdrop-filter: blur(8px);
  animation: gateIn .35s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes gateIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

.gate__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(28px, 4vw, 44px);
  background: #17141F;
  border: 1px solid #262238;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  animation: gateIn .45s cubic-bezier(.16, 1, .3, 1) .05s both;
}

.gate__panel.is-shaking {
  animation: gateShake .4s ease both;
}

.gate__eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: .18em;
  color: #7A7A7A;
}

.gate__title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #E3E3E3;
}

.gate__body {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.6;
  color: #A5A5A5;
  text-wrap: pretty;
}

.gate__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate__label {
  font-size: 11px;
  letter-spacing: .16em;
  color: #7A7A7A;
}

.gate__input {
  width: 100%;
  padding: 14px 16px;
  background: #0F0D18;
  border: 1px solid #332E45;
  border-radius: 8px;
  color: #E3E3E3;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .08em;
  transition: border-color .3s;
}

.gate__input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Holds its line so a failed attempt does not shift the panel. */
.gate__error {
  min-height: 1.2em;
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  color: #E0489B;
}

.gate__submit {
  margin-top: 4px;
  padding: 15px 24px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: #FFF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .3s, transform .3s cubic-bezier(.16, 1, .3, 1);
}

.gate__submit:hover {
  opacity: .88;
}

.gate__submit:disabled {
  opacity: .5;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .gate,
  .gate__panel,
  .gate__panel.is-shaking {
    animation: none;
  }
}
