/* ==========================================================================
   Mission — login page
   The one place the full celestial horizon appears.
   ========================================================================== */

.login {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
}

/* ---------- The sky ---------- */
.sky {
  position: fixed;
  inset: 0 0 auto 0;
  height: 74svh;
  min-height: 420px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
  opacity: 0;
  transform: scale(1.06) translateY(1.5%);
  animation: sky-in 2.8s var(--ease-out-slow) 0.1s forwards;
}
@keyframes sky-in {
  to { opacity: 1; transform: none; }
}
/* Fade the image into the page: bottom, and gently at the sides on wide screens */
.sky::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(5,6,10,0) 0%, rgba(5,6,10,0) 48%, rgba(5,6,10,0.55) 72%, var(--bg) 98%),
    radial-gradient(130% 90% at 50% 40%, rgba(5,6,10,0) 55%, rgba(5,6,10,0.65) 100%);
}

/* ---------- Content column ---------- */
.auth {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--s4) max(var(--s6), env(safe-area-inset-bottom));
}

.auth-main {
  width: 100%;
  max-width: 360px;
  margin-top: auto;           /* pushes the block below the horizon */
  padding-top: 52svh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  margin-bottom: var(--s10);
  opacity: 0;
  animation: rise 1.2s var(--ease-out-slow) 0.9s forwards;
}
.brand img { width: 152px; height: auto; }

/* Panels swap between: choose method → email form → check inbox */
.panel {
  width: 100%;
  display: grid;
  gap: var(--s3);
}
.panel[hidden] { display: none; }
.panel.is-entering { animation: rise 0.45s var(--ease-out-slow) both; }

.panel-choose > * { opacity: 0; animation: rise 0.9s var(--ease-out-slow) forwards; }
.panel-choose > :nth-child(1) { animation-delay: 1.15s; }
.panel-choose > :nth-child(2) { animation-delay: 1.25s; }
.panel-choose > :nth-child(3) { animation-delay: 1.35s; }
.panel-choose.is-entering > * { opacity: 1; animation: none; }

.panel-head { text-align: center; margin-bottom: var(--s2); }
.panel-head h2 { font-size: var(--fs-lg); font-weight: 500; }
.panel-head p { margin: var(--s2) 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.panel-head strong { color: var(--text); font-weight: 500; word-break: break-all; }

.back {
  justify-self: center;
  margin-top: var(--s1);
  font-size: var(--fs-sm);
}

.status {
  min-height: 1.25rem;
  margin: var(--s3) 0 0;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.status.is-error { color: var(--danger); }

/* ---------- Footer ---------- */
.legal {
  margin-top: var(--s10);
  display: flex;
  gap: var(--s6);
  font-size: var(--fs-xs);
  opacity: 0;
  animation: fade 1.2s var(--ease) 1.6s forwards;
}
.legal a {
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--t-med) var(--ease);
}
.legal a:hover { color: var(--text-2); }
.legal a:focus-visible { outline: none; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
/* Short screens (landscape phones, small laptops): tighten the vertical rhythm */
@media (max-height: 760px) {
  .auth-main { padding-top: 46svh; }
  .brand { margin-bottom: var(--s8); }
  .legal { margin-top: var(--s8); }
}
@media (max-height: 560px) {
  .sky { height: 100svh; }
  .auth-main { padding-top: 38svh; }
  .brand { margin-bottom: var(--s6); }
  .brand img { width: 132px; }
}
/* Large screens: a touch more air */
@media (min-width: 900px) and (min-height: 820px) {
  .auth-main { max-width: 380px; padding-top: 54svh; }
  .brand img { width: 168px; }
}
