/* Sign-in / setup / invite pages: deep navy stage with drifting glows. */
body.auth { background: var(--navy); color: var(--ink-light); overflow-x: hidden; }

.stage__bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(45% 55% at 25% 24%, rgba(60, 78, 150, 0.32), transparent 72%),
    radial-gradient(45% 55% at 78% 20%, rgba(92, 66, 156, 0.3), transparent 72%),
    radial-gradient(50% 60% at 70% 85%, rgba(40, 60, 128, 0.28), transparent 72%),
    radial-gradient(45% 55% at 20% 86%, rgba(74, 60, 140, 0.24), transparent 72%),
    var(--navy);
  background-size: 165% 165vh;
  animation: bg-drift 26s ease-in-out infinite;
}
.stage__glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background: radial-gradient(60% 45% at 50% 108%, rgba(255, 168, 96, 0.4), transparent 72%);
}
.stage__grid {
  position: fixed; inset: clamp(16px, 4vw, 64px); z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 25% 33.333%;
  border-right: 1px solid rgba(255, 255, 255, 0.07); border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
@keyframes bg-drift {
  0%, 100% { background-position: 0% 50%; }
  33% { background-position: 100% 25%; }
  66% { background-position: 45% 100%; }
}

.auth__brand { position: fixed; top: 2rem; left: 2rem; z-index: 5; color: #fff; }

.auth__wrap {
  position: relative; z-index: 2; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; gap: clamp(32px, 6vw, 96px);
  padding: clamp(96px, 12vh, 140px) clamp(20px, 6vw, 96px) clamp(40px, 8vh, 80px);
  max-width: 1320px; margin: 0 auto;
}

.auth__pitch { flex: 1 1 46%; max-width: 560px; display: grid; gap: 22px; }
.auth__pitch h1 { font-weight: 600; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1.05; letter-spacing: -0.025em; }
.auth__pitch .lede { font-size: clamp(1rem, 1.2vw, 1.15rem); color: rgba(245, 245, 247, 0.72); max-width: 44ch; }

/* ---- floating foil cards ---- */
.cards { position: relative; height: clamp(190px, 24vw, 280px); margin-top: 14px; perspective: 1400px; }
.fcard {
  --mx: 50%; --my: 50%; --active: 0;
  position: absolute; top: 0; width: clamp(120px, 14vw, 178px); aspect-ratio: 0.71;
  border-radius: 12px; overflow: hidden; color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  transform: rotate(var(--rot)) translateY(var(--lift, 0));
  transition: transform 0.5s var(--ease-spring), box-shadow 0.3s ease;
  animation: card-in 0.9s var(--ease-spring) backwards; animation-delay: var(--delay);
}
.fcard:hover { --lift: -10px; --active: 1; z-index: 3; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.fcard:nth-child(1) { left: 0; --rot: -8deg; --delay: 0.15s; background: linear-gradient(150deg, #fff2c9, #f5c76b); }
.fcard:nth-child(2) { left: clamp(108px, 12.6vw, 160px); top: 14px; --rot: 3deg; --delay: 0.27s; background: linear-gradient(150deg, #e4f9ff, #89cfdb); }
.fcard:nth-child(3) { left: clamp(216px, 25.2vw, 320px); --rot: 11deg; --delay: 0.39s; background: linear-gradient(150deg, #ffe8cd, #ffb9a8); }
@keyframes card-in { from { opacity: 0; transform: rotate(0deg) translateY(60px) scale(0.9); } }
.fcard__frame {
  position: absolute; inset: 6px; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 8px;
  box-shadow: 0 1px rgba(255, 255, 255, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08) inset; pointer-events: none; z-index: 2;
}
.fcard__foil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: var(--foil); background-size: 260% 260%; background-position: var(--mx) var(--my);
  mix-blend-mode: color-dodge; opacity: calc(var(--active) * 0.5); transition: opacity 0.35s ease;
}
.fcard__glare {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255, 255, 255, 0.8) 8%, rgba(255, 255, 255, 0.18) 34%, transparent 60%);
  mix-blend-mode: overlay; opacity: var(--active); transition: opacity 0.35s ease;
}
.fcard__inner { position: relative; z-index: 3; height: 100%; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.fcard__inner .eyebrow { font-size: 0.62rem; color: #0b3140; }
.fcard__inner strong { font-weight: 600; font-size: clamp(0.95rem, 1.3vw, 1.2rem); line-height: 1.08; letter-spacing: -0.02em; }
.fcard__inner svg { width: 34px; height: 34px; opacity: 0.85; }

/* ---- form card ---- */
.auth__card {
  flex: 0 1 440px; position: relative; padding: clamp(22px, 2.4vw, 34px);
  border-radius: var(--r-22); border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 20, 40, 0.97); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.6s var(--ease-spring) backwards;
}
.auth__card form { display: grid; gap: 16px; }
.auth__card h2 { font-weight: 600; font-size: 1.7rem; line-height: 1.1; letter-spacing: -0.02em; }
.auth__card .sub { color: rgba(245, 245, 247, 0.65); font-size: 0.95rem; margin-top: -8px; }
.auth__card .input {
  padding: 13px 14px; border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); color: var(--ink-light);
}
.auth__card .input::placeholder { color: rgba(245, 245, 247, 0.35); }
.auth__card .input:focus { border-color: var(--brand-hi); background: rgba(255, 255, 255, 0.1); box-shadow: none; }
.auth__card .form-error { color: #ff9e86; }
.auth__card .input[aria-invalid='true'] { border-color: #ff9e86 !important; }
.auth__card .pw__caps { color: #f5c76b; }
.auth__card .fine { font-size: 0.82rem; color: rgba(245, 245, 247, 0.5); text-align: center; }
.auth__card .fine a { color: rgba(245, 245, 247, 0.8); }

@media (max-width: 860px) {
  .auth__brand { top: 1rem; left: 1rem; }
  .auth__wrap { flex-direction: column; align-items: stretch; padding-top: 88px; gap: 28px; }
  .auth__pitch { max-width: none; gap: 14px; }
  .cards { display: none; }
  .auth__card { flex: none; }
}
