/* =================================================================
   Auth pages — centered single-stage hero (sunset orange + light pink)
   --------------------------------------------------------------------
   Layout reasoning (Dribbble synthesis): a centered glass card is
   easier to scan than a split-pane on tablet/mobile and reads as a
   focused "stage" rather than marketing+form competing for attention.
   The brand seal sits above the title; trust signals collapse to a
   discreet row beneath the form.
   ================================================================= */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--sp-8) var(--sp-5);
  background:
    radial-gradient(900px 620px at 50% -10%,  rgba(247, 111, 21, 0.14), transparent 60%),
    radial-gradient(720px 540px at 50% 110%, rgba(245, 74, 125, 0.10), transparent 60%),
    linear-gradient(180deg, #fffaf3, var(--ivory-50) 60%, #fff3e6);
  position: relative;
  overflow: hidden;
}

/* Soft drifting orbs behind the card — purposeful, not decorative blobs.
   They establish the "sunset" mood and give the eye motion to track,
   so the static card feels alive without distracting from the form. */
.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.55;
  animation: auth-orb-drift 18s var(--ease-silk) infinite alternate;
}
.auth-shell::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(247, 142, 30, 0.55), transparent 70%);
  top: -180px; left: -120px;
}
.auth-shell::after {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(245, 110, 150, 0.42), transparent 70%);
  bottom: -160px; right: -120px;
  animation-duration: 22s;
  animation-direction: alternate-reverse;
}
@keyframes auth-orb-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(40px, 30px, 0) scale(1.08); }
}

.auth-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
}

/* ---------- Brand identity above the form ---------- */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
  animation: auth-brand-rise 700ms var(--ease-silk) both;
}
.auth-brand__seal {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow:
    0 12px 28px rgba(168, 71, 10, 0.22),
    0 0 0 6px rgba(247, 111, 21, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
}
.auth-brand__seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-brand__seal::after {
  /* slow rotating warm halo — runs behind the seal, gives it presence */
  content: "";
  position: absolute;
  inset: -16px;
  background: conic-gradient(from 0deg,
    rgba(247, 111, 21, 0.0) 0deg,
    rgba(247, 111, 21, 0.30) 90deg,
    rgba(245, 74, 125, 0.30) 180deg,
    rgba(247, 111, 21, 0.0) 270deg);
  border-radius: 50%;
  z-index: -1;
  animation: auth-halo-spin 14s linear infinite;
}
@keyframes auth-halo-spin { to { transform: rotate(360deg); } }

.auth-brand__title {
  font-family: var(--font-display);
  font-size: var(--fs-30);
  font-weight: 600;
  margin: 0;
  letter-spacing: var(--tracking-display);
  color: var(--mauve-900);
  line-height: 1.1;
}
.auth-brand__sub {
  font-size: var(--fs-12);
  color: var(--mauve-700);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  margin: 0;
  font-weight: 600;
}

@keyframes auth-brand-rise {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- The form card ---------- */
.auth-card {
  width: 100%;
  background: var(--surface-card);
  border-radius: var(--r-3xl);
  padding: var(--sp-10) var(--sp-8) var(--sp-8);
  box-shadow:
    0 30px 60px -20px rgba(168, 71, 10, 0.18),
    0 12px 28px -10px rgba(245, 74, 125, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: auth-card-in 700ms var(--ease-silk) 120ms both;
  position: relative;
  isolation: isolate;
}
.auth-card::before {
  /* warm gradient ribbon at the top edge — anchors the brand color */
  content: "";
  position: absolute;
  top: 0; left: var(--sp-8); right: var(--sp-8);
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg,
    var(--mauve-500), var(--mauve-700) 50%, var(--rose-500));
}

@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-36);
  font-weight: 500;
  margin: 0 0 var(--sp-1);
  letter-spacing: var(--tracking-display);
  color: var(--mauve-900);
  text-align: center;
}
.auth-card__subtitle {
  color: var(--text-muted);
  margin: 0 0 var(--sp-6);
  text-align: center;
  font-size: var(--fs-14);
}
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Stagger form rows in after the card mounts */
.auth-card .form-group        { animation: auth-row-in 480ms var(--ease-silk) 280ms both; }
.auth-card .form-group + .form-group { animation-delay: 360ms; }
.auth-card .form-actions      { animation: auth-row-in 480ms var(--ease-silk) 440ms both; }
.auth-card .auth-card__hint   { animation: auth-row-in 480ms var(--ease-silk) 520ms both; }
@keyframes auth-row-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card__hint {
  margin-top: var(--sp-4);
  text-align: center;
  font-size: var(--fs-12);
  color: var(--text-muted);
}
.auth-card__hint a { color: var(--rose-700); font-weight: 600; }

.auth-error {
  background: var(--danger-50);
  border: 1px solid #f3b9be;
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  color: var(--danger-700);
  font-size: var(--fs-14);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  animation: auth-error-shake 360ms var(--ease-emphasized);
}
@keyframes auth-error-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

/* ---------- Trust signals row beneath the card ---------- */
.auth-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-12);
  color: var(--mauve-700);
  letter-spacing: 0.04em;
  animation: auth-row-in 600ms var(--ease-silk) 600ms both;
}
.auth-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(168, 71, 10, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 600;
}
.auth-trust__item svg { color: var(--mauve-600); }

.auth-footer {
  text-align: center;
  font-size: var(--fs-12);
  color: var(--text-muted);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  animation: auth-row-in 600ms var(--ease-silk) 720ms both;
}
.auth-footer strong { color: var(--mauve-700); font-weight: 600; }

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .auth-shell { padding: var(--sp-6) var(--sp-4); }
  .auth-card { padding: var(--sp-8) var(--sp-5) var(--sp-6); }
  .auth-brand__title { font-size: var(--fs-24); }
  .auth-card__title { font-size: var(--fs-30); }
  .auth-trust { gap: var(--sp-1) var(--sp-2); }
  .auth-trust__item { padding: 4px 10px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .auth-shell::before,
  .auth-shell::after,
  .auth-brand__seal::after { animation: none; }
  .auth-brand,
  .auth-card,
  .auth-card .form-group,
  .auth-card .form-actions,
  .auth-card .auth-card__hint,
  .auth-trust,
  .auth-footer { animation: none !important; opacity: 1; transform: none; }
}
