/* Motion from assets/klein4-login-animation.html, within the existing hero. */
html {
  /* Keep the hero's final width identical when the landing gains a scrollbar. */
  scrollbar-gutter: stable;
}

/* The locked page needs no reserved strip beside its full-width artwork. */
html:has(.landing-page.is-locked) {
  scrollbar-gutter: auto;
}

/* Start with the safe stacked layout. The measured layout below prefers
   two columns whenever the complete wordmark fits beside the actual form. */
.landing-page.is-locked { display: block; min-height: 0; }
.landing-page.is-locked main { display: block; }
.entry { grid-template-columns: minmax(0, 1fr); }
.entry-plate > picture {
  position: absolute;
  inset: 0;
  display: block;
}
.entry .entry-plate {
  height: auto;
  min-height: 0;
  aspect-ratio: 25 / 9;
  border-right: 0;
  border-bottom: 1px solid var(--hairline);
}
.entry .gate { padding: 36px clamp(20px, 4vw, 68px) 48px; }
.entry .gate h1 { font-size: clamp(34px, 4.2vw, 58px); }

.entry.layout-ready:not(.is-stacked) {
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, var(--login-image-width, 51.46%)) minmax(0, 1fr);
}
.entry.layout-ready:not(.is-stacked) .entry-plate {
  aspect-ratio: auto;
  border-right: 1px solid var(--hairline);
  border-bottom: 0;
}
.entry.layout-ready:not(.is-stacked) .gate {
  padding: clamp(30px, 6vh, 76px) clamp(24px, 4vw, 68px);
}
.entry .gate-field, .entry .gate-input { min-width: 0; }
.entry .gate-input { width: 100%; }

.login-motion {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  isolation: isolate;
}

.login-art {
  position: absolute;
}

.login-background,
.entry-plate .login-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  transform: scale(1.001);
}

.login-perspective {
  position: absolute;
  left: 28.32%;
  top: 22.4%;
  width: 46.2%;
  height: 44.3%;
  perspective: 1100px;
  perspective-origin: 50% 50%;
}

.login-lift,
.login-logo {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.login-logo img,
.entry-plate .login-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  backface-visibility: visible;
}

.login-light {
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 32%, #ffffff70 48%, transparent 64%);
  transform: translateX(-130%);
  opacity: 0;
  mix-blend-mode: soft-light;
}

.gate-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--graphite);
  font-size: 14px;
}

.gate-form button:disabled {
  cursor: wait;
}

.is-login-transitioning {
  overflow: hidden;
}

.login-destination {
  position: fixed;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
}

.login-bridge {
  position: fixed;
  z-index: 21;
  overflow: hidden;
  pointer-events: none;
  background: var(--paper);
}

.login-bridge .login-motion {
  opacity: 1;
}

#unlocked-heading:focus {
  outline: none;
}
