/* ————————————————————————————————
   the door — a moon, a question, nothing else
   ———————————————————————————————— */

/* ——— the layout ——— */

.landing {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 4rem;
}

/* the moon, a touch smaller than on the sky — it is the whole page */
.landing-moon { margin-top: 0; }

.landing .moon {
  width: clamp(9rem, 24vw, 12rem);
  height: clamp(9rem, 24vw, 12rem);
  background:
    radial-gradient(circle at 34% 30%, #FBF7EC 0%, var(--moon) 45%, #DDD5BF 100%);
}

/* ——— the door ——— */

.landing-door {
  width: min(88vw, 22rem);
  margin-top: clamp(2.5rem, 7vh, 4rem);
  text-align: center;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.landing-door.shown {
  opacity: 1;
  transform: translateY(0);
}

.landing-form {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
}

.landing-form input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.8rem 1.1rem;
  font-family: var(--font-utility);
  font-size: 1rem;
  text-align: center;
  color: var(--moon);
  background: rgba(7, 11, 29, 0.5);
  border: 1px solid rgba(231, 201, 130, 0.24);
  border-radius: 0.7rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.landing-form input::placeholder { color: rgba(246, 241, 228, 0.32); }

.landing-form input:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(231, 201, 130, 0.16);
}

.landing-form button {
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: var(--gold-dim);
  background: rgba(7, 13, 34, 0.45);
  border: 1px solid rgba(231, 201, 130, 0.22);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

.landing-form button:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}

.landing-form button:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.landing-form button:active { transform: translateY(0); }

/* wrong anything: the same gentle shake the gate uses */
.landing-form.shake { animation: shake 0.45s ease; }

/* ——— the quiet line beneath the form ——— */

.landing-line {
  min-height: 1.5em;
  margin: 1rem 0 0.7rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.4;
  color: rgba(231, 201, 130, 0.75);
  opacity: 0;
  transition: opacity 0.7s ease;
}

.landing-line.shown { opacity: 1; }

/* ——— the loading breath: three slow gold dots ———
   shown while the moon checks whether it already knows this visitor.
   a signed-in person sees only the sky and this breath, then the
   redirect — never the sign-in door. mirrors the shell's breath. */

.landing-loading {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.landing-loading.landing-loading-on { opacity: 1; }

.landing-loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(231, 201, 130, 0.55);
  opacity: 0.3;
  animation: landingBreathe 2.2s ease-in-out infinite;
}

.landing-loading-dot:nth-child(2) { animation-delay: 0.35s; }
.landing-loading-dot:nth-child(3) { animation-delay: 0.7s; }

@keyframes landingBreathe {
  0%, 100% { opacity: 0.22; transform: scale(0.82); }
  50%      { opacity: 0.9;  transform: scale(1); }
}

/* ————— reduced motion ————— */

@media (prefers-reduced-motion: reduce) {
  .landing-door, .landing-line { transition: none; }
  .landing-form.shake { animation: none; }
  .landing-loading { transition: none; }
  .landing-loading-dot { animation: none; opacity: 0.55; }
}
