* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  margin: 0;
  background: #050403;
}

main {
  position: relative;
  width: 100%;
}

.auth-image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(-11rem, -9vw, -4.5rem);
}

.password-prompt {
  position: fixed;
  z-index: 2;
  top: 65%;
  left: 50%;
  width: min(calc(100% - 2rem), 31rem);
  padding: clamp(1.4rem, 4vw, 2.25rem);
  border: 0.35rem double #9c6a2e;
  border-radius: 0.25rem;
  color: #f3dfb4;
  text-align: center;
  background:
    linear-gradient(rgb(16 8 4 / 80%), rgb(16 8 4 / 80%)),
    #32170d;
  box-shadow:
    inset 0 0 0 1px #32170d,
    inset 0 0 1.5rem rgb(0 0 0 / 75%),
    0 1rem 3rem rgb(0 0 0 / 80%);
  transform: translate(-50%, -50%);
  animation: prompt-pop 420ms cubic-bezier(0.2, 0.85, 0.3, 1.15) both;
}

.password-prompt h1 {
  margin: 0 0 1.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.auth-error {
  margin: 0 0 1rem;
  color: #ffd1ba;
}

.auth-error:empty {
  display: none;
}

.password-form input,
.password-form button {
  min-height: 3rem;
  border: 2px solid #17100b;
  border-radius: 0.2rem;
  font: inherit;
}

.password-form input {
  min-width: 0;
  padding: 0.6rem 0.75rem;
  color: #21150c;
  background: #efe1bf;
  box-shadow: inset 0 0.15rem 0.35rem rgb(0 0 0 / 35%);
}

.password-form button {
  padding: 0.6rem 1.15rem;
  color: #f3dfb4;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(#58301c, #2a130a);
  box-shadow: inset 0 1px rgb(255 220 163 / 24%), 0 0.2rem 0 #100704;
  cursor: pointer;
}

.password-form button:active {
  box-shadow: inset 0 0.15rem 0.3rem rgb(0 0 0 / 55%);
  transform: translateY(0.15rem);
}

.password-form input:focus-visible,
.password-form button:focus-visible {
  outline: 3px solid #f3dfb4;
  outline-offset: 2px;
}

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

@keyframes prompt-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.86);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 30rem) {
  .password-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .password-prompt {
    animation: none;
  }
}
