/* The password page: a full-screen photo with one dark card, like the Welcome page.
   Shared colours, fonts and buttons come from /styles/site.css. */

html,
body.unlock {
  margin: 0;
  height: 100%;
  background: var(--cliff);
}

.unlock-frame {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
}

.unlock-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* A light shade at the top and bottom keeps the logo readable on any photo. */
.unlock-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(18, 19, 16, 0.4), rgba(18, 19, 16, 0) 32%, rgba(18, 19, 16, 0.22));
  pointer-events: none;
}

/* On wide screens the card can sit to one side so the photo's subject stays in view. */
@media (min-width: 700px) {
  .unlock-frame-left {
    place-items: center start;
    padding-left: clamp(1.25rem, 8vw, 7rem);
  }
}

.unlock-card {
  position: relative;
  width: min(100%, 23rem);
  padding: 3.25rem 2rem 2rem;
  clip-path: polygon(0 1.75rem, 100% 0, 100% 100%, 0 100%);
}

.unlock-card label {
  display: block;
  margin: 0 0 0.4rem;
  color: var(--on-mass-2);
  font-size: 1.125rem;
  text-align: center;
}

.unlock-card input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #4b4d3f;
  border-radius: var(--r-control);
  background: var(--mass-2);
  color: var(--on-mass);
  font: 400 1rem / 1.4 var(--font-body);
}

.unlock-card input:hover {
  border-color: var(--sea);
}

.unlock-card input:focus-visible {
  border-color: var(--sand);
}

.unlock-error {
  margin-top: 0.75rem;
  color: #d8a387;
  font-size: 0.9375rem;
}

.unlock-card .btn {
  width: 100%;
  margin-top: 1.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  .unlock-card {
    animation: unlock-in var(--t-reveal) var(--ease) both;
  }

  .sitebar {
    animation: unlock-fade 2s ease-in-out both;
  }
}

@keyframes unlock-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes unlock-fade {
  from {
    opacity: 0;
  }
}
