/* ---- background ------------------------------------------------------------
   Drifting aurora, the same idiom as the landing page's (.lp-aurora). Three
   blurred radial blobs on long, offset animations: cheap, and it reads as depth
   rather than as a video playing behind a form.

   Fixed rather than absolute, and clipped by body's overflow, because the blobs
   are deliberately larger than the viewport — left to grow the document they
   would widen it and give a phone a sideways scroll on a page with one card on
   it. Unlike landing.css, which is committed to a single light look, everything
   here resolves through tokens.css, so the dark palette still applies. */
/* The app-wide ambient wash (app.css body::before/::after) is switched off on
   this page. It is two blue blobs on their own 26s/32s drift, and running them
   underneath the aurora below means two ambient systems moving at different
   rates behind one small card — which reads as restlessness rather than depth.
   One field, not two. */
body::before, body::after { content: none; }

.auth-aurora {
  position: fixed;
  inset: -20% -15%;
  pointer-events: none;
  z-index: 0;
  filter: blur(70px);
  opacity: 0.5;
  overflow: hidden;
}

/* Colour carries much further on a dark ground: the same blobs that read as a
   soft wash on cream read as stage lighting on navy. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth-aurora { opacity: 0.34; }
}

:root[data-theme="dark"] .auth-aurora { opacity: 0.34; }

.auth-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.auth-blob-1 {
  width: min(520px, 78vw); height: min(520px, 78vw);
  left: 2%; top: 0%;
  background: radial-gradient(circle, var(--ebid-accent), transparent 68%);
  animation: auth-drift-a 22s ease-in-out infinite;
}

.auth-blob-2 {
  width: min(460px, 70vw); height: min(460px, 70vw);
  right: 4%; top: 22%;
  background: radial-gradient(circle, var(--ebid-orange), transparent 66%);
  animation: auth-drift-b 26s ease-in-out infinite;
}

.auth-blob-3 {
  width: min(420px, 64vw); height: min(420px, 64vw);
  left: 38%; bottom: 2%;
  background: radial-gradient(circle, var(--brand-navy), transparent 70%);
  animation: auth-drift-c 30s ease-in-out infinite;
}

@keyframes auth-drift-a { 50% { transform: translate3d(90px, 60px, 0) scale(1.14); } }
@keyframes auth-drift-b { 50% { transform: translate3d(-110px, 40px, 0) scale(1.08); } }
@keyframes auth-drift-c { 50% { transform: translate3d(40px, -70px, 0) scale(0.9); } }

/* Faint grid, masked to fade out. Grounds the aurora — without it the blobs
   float with nothing to be in front of. */
.auth-grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--glass-edge) 1px, transparent 1px),
    linear-gradient(90deg, var(--glass-edge) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 76%);
}

.auth-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: var(--space-6) var(--space-5);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.auth-brand .brand-mark {
  width: 44px;
  height: 44px;
  font-size: 20px;
  border-radius: 13px;
}

.auth-title {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
}

.auth-heading {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.auth-copy {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 var(--space-5);
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  margin: var(--space-4) 0 0;
}

.otp-input {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5em;
  padding-left: 0.5em;
}

.auth-panel-center {
  text-align: center;
  position: relative;
}

/* The label and the "forgot password?" link share a row, so the way out of a
   forgotten password sits where the password is rather than below the button
   with the sign-up link, where it reads as an afterthought. */
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.link-btn-quiet {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.link-btn-quiet:hover { color: var(--ebid-accent); }

/* Why the visitor is looking at a sign-in form again. Stated rather than
   implied — a redirect with no explanation reads as the app losing your place. */
.auth-notice {
  margin: 0 0 var(--space-4);
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--ebid-primary-tint);
  color: var(--ebid-primary-dark);
  font-size: 12.5px;
  line-height: 1.5;
}

/* The offer a visitor arrived with (M-PAY-LINK). The notice's colours, laid
   out as a headline over its terms, and a way to the landing page for anybody
   who wants to read about the product before filling in a form. */
.auth-offer {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auth-offer strong { font-size: 13.5px; }
.auth-offer a {
  color: var(--ebid-primary);
  font-weight: 600;
  margin-top: 4px;
}
.auth-offer[hidden] { display: none; }

/* The request that ended the session. Deliberately plain and monospaced — it is
   diagnostic text, not copy, and dressing it up would invite reading it as an
   apology rather than as the fact it is. */
.auth-cause {
  margin: -10px 0 var(--space-4);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--text-tertiary);
  word-break: break-all;
}

.auth-switch-sep {
  color: var(--text-tertiary);
  margin: 0 6px;
}

/* The animation is decoration, and decoration is the first thing to go for
   somebody who asked the OS not to move things. Matches app.css and
   landing.css. */
@media (prefers-reduced-motion: reduce) {
  .auth-blob { animation: none; }
}
