/* ---------- Sign-in page ---------- */

.login-body { overflow: hidden; }

.login-wrap {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--frame-t) + 16px) calc(var(--frame-r) + 16px) calc(var(--frame-b) + 16px) calc(var(--frame-l) + 16px);
  overflow-y: auto;
}

.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(440px, 100%);
  padding: 36px 36px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(60, 30, 0, .12);
  text-align: center;
}

.login-logo { width: 110px; height: auto; }

.login-eyebrow {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-900);
}

.login-card h1 {
  margin: 4px 0 6px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.login-sub { margin: 0 0 24px; font-size: 16px; color: var(--ink-soft); }

/* Follows Microsoft's "Sign in with Microsoft" button guidance: logo, label, neutral styling. */
.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 52px;
  border: 1px solid #8c8c8c;
  border-radius: 6px;
  background: #fff;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #5e5e5e;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}

.ms-btn svg { width: 21px; height: 21px; }
.ms-btn:hover { background: #f3f3f3; }
.ms-btn:focus-visible { outline: 3px solid rgba(31, 90, 69, .35); outline-offset: 2px; }
.ms-btn:disabled { opacity: .6; cursor: progress; }

.login-note { margin: 16px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

.login-help {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.login-help a { font-weight: 700; color: var(--green-700); }
.login-clubit { height: 26px; width: auto; }

/* ---------- Whirlpool loading screen ---------- */

.loader-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 45%, #1d3a2e, #0f1f18 70%);
  opacity: 0;
  transition: opacity .35s ease;
}

.loader-screen.show { opacity: 1; }

.whirlpool { width: min(60vw, 420px); height: auto; max-height: 55vh; }

.whirlpool-spin {
  transform-origin: 0 0;
  animation: whirl-spin 20s linear infinite;
}

/* Matches framer-motion: 0.5s in, hold 1s, 0.5s out, hold 1s = 3s cycle. */
.whirlpool circle {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transform: scale(0);
  animation: whirl-dot 3s ease-in-out infinite;
}

.loader-text {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #f3e6d2;
}

@keyframes whirl-spin { to { transform: rotate(360deg); } }

@keyframes whirl-dot {
  0% { opacity: 0; transform: scale(0); }
  16.7%, 50% { opacity: 1; transform: scale(1); }
  66.7%, 100% { opacity: 0; transform: scale(0); }
}

@media (prefers-reduced-motion: reduce) {
  .whirlpool-spin { animation: none; }
  .whirlpool circle { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .login-card { padding: 28px 22px 22px; }
  .login-card h1 { font-size: 28px; }
}

/* ---------- Background photo (Goonoowigall, from armajun.org.au) ---------- */

.login-body {
  background: #3b2a1c url("../assets/login-bg.webp") center / cover no-repeat;
}

.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 63, 49, .25), rgba(22, 63, 49, .45));
  pointer-events: none;
}

.login-wrap { z-index: 1; }

.login-card {
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.photo-credit {
  position: fixed;
  right: calc(var(--frame-r) + 40px);
  bottom: calc(var(--frame-b) + 22px);
  z-index: 1;
  font-size: 12px;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
