/* ------------------------------------------------------------------ */
/* banner: edge to edge, no padding, no margin, fit left to right      */
/* ------------------------------------------------------------------ */
.login-hero {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  /*
   * The photo is 1980x1131. At a 1440px-wide viewport a 340px banner showed
   * only 41% of it, which cropped the character in half. A taller banner plus a
   * lower focal point keeps the whole subject in frame.
   */
  height: clamp(260px, 50vw, 600px);
  overflow: hidden;
  background: #000;
  display: block;
}

.login-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  /* fill the banner, centred horizontally, never letterboxed */
  object-fit: cover;
  object-position: center 55%;
}

.login-hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  /* clear for almost the whole drop, so only the last few pixels melt into the
     page background instead of greying out the lower half of the photo */
  background: linear-gradient(
    to bottom,
    rgb(11 11 13 / 0%) 0%,
    rgb(11 11 13 / 0%) 92%,
    var(--bg) 100%
  );
  pointer-events: none;
}

/* status pill now lives under the form, not over the banner */
.login-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 0;
  padding: 7px 15px;
  border-radius: 99px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  width: fit-content;
}
.login-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
  flex: none;
}

/* ------------------------------------------------------------------ */
/* form                                                                 */
/* ------------------------------------------------------------------ */
.login-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background:
    radial-gradient(1100px 420px at 50% -60px, color-mix(in srgb, var(--orange) 13%, transparent), transparent 70%),
    var(--bg);
}

.login-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(24px, 5vw, 52px) 20px clamp(40px, 8vw, 80px);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 32px);
  padding-bottom: 10px;
  box-shadow: var(--shadow);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.login-form-title {
  margin: 0 0 -2px;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
}
.login-form-title::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin: 9px auto 0;
  border-radius: 99px;
  background: var(--orange);
}

.login-secret {
  position: relative;
  display: flex;
}
.login-secret .input {
  padding-right: 46px;
}
.login-secret-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  transition:
    color 0.14s ease,
    background 0.14s ease;
}
.login-secret-btn:hover {
  color: var(--text);
  background: var(--bg-3);
}
.login-secret-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.login-error {
  margin: -2px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: #fecaca;
  font-size: 13.5px;
  animation: shake 0.32s ease;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

.login-submit {
  height: 44px;
  margin-top: 4px;
  font-size: 15px;
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 8px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text-mute);
  text-align: center;
}
.login-foot svg {
  flex: none;
  opacity: 0.75;
}

@media (min-width: 901px) {
  /*
   * On a wide screen a full-bleed 1980px photo is scaled so far up that the
   * subject is cropped and the bottom edge fights the fade. Cap it at 450px,
   * centre it, and let the page background fill the rest.
   */
  .login-hero {
    background: var(--bg);
  }
  .login-hero-img {
    max-width: 450px;
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  .login-hero {
    height: clamp(210px, 58vw, 320px);
  }
  .login-foot {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}