/* ==========================================================================
   Bluebookers — Login (split hero + form)
   Self-contained; does NOT share classes with style.css.
   ========================================================================== */
   @font-face {
  font-family: 'Europa Grotesk SH', var(--font-sans);
  src: url('../fonts/europa-grotesk-sh-bold.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --a-navy-900: #0b1b30;
  --a-navy-800: #0f2744;
  --a-navy-700: #163a63;
  --a-blue-500: #3b7dd8;
  --a-blue-600: #2f6fce;
  --a-blue-700: #2861b3;
  --a-ink-900:  #16324f;
  --a-ink-500:  #5b7693;
  --a-gray-100: #f4f7fb;
  --a-gray-300: #d8e0ea;
  --a-line:     #e4ebf3;
  --a-panel-bg: #f7fafd;
  --a-card-bg:  #ffffff;
  --a-text:     #16324f;
  --a-muted:    #6a809a;
  --a-input-bg: #f2f6fb;
  --font-serif: 'Playfair Display', serif;
  --font-sans:  'Inter', sans-serif;
  --radius-md: 12px;
  --radius-sm: 9px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
img, svg { display: block; }

.bb-auth {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--a-text);
  background: var(--a-panel-bg);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 2.5fr 1fr;
}

/* ─────────── LEFT: HERO ─────────── */
.auth-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: stretch;
}
.auth-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 15%, rgba(59,125,216,0.22) 0%, transparent 55%),
    linear-gradient(155deg, rgba(11,27,48,0.82) 0%, rgba(15,39,68,0.78) 55%, rgba(18,41,74,0.85) 100%),
    url('../images/lobby.jpg') center / cover no-repeat;
}
.auth-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
}

.auth-brand { display: flex; align-items: center; gap: 14px; }

/* Logo image (replaces the old .auth-brand__mark box) */
.auth-brand__logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
}

.auth-brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.auth-brand__name { font-weight: 700; letter-spacing: 0.22em; font-size: 0.95rem; }
.auth-brand__sub  { font-size: 0.68rem; letter-spacing: 0.18em; color: rgba(255,255,255,0.55); text-transform: uppercase; }

.auth-hero__copy { margin: auto 0; padding: 40px 0; }
.auth-hero__eyebrow {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--a-blue-500);
  font-style: italic;
}
.auth-hero__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4rem);
  margin: 2px 0 0;
  line-height: 1.02;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
.auth-hero__accent {
  display: block;
  width: 367px; height: 3px;
  border-radius: 3px;
  background: var(--a-blue-500);
  margin: 22px 0;
}
.auth-hero__lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

/* Location + live clock strip */
.auth-meta {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-meta__row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
}
.auth-meta__row svg { width: 21px; height: 21px; color: var(--a-blue-500); flex-shrink: 0; }
.auth-meta__clock {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
}
.auth-meta__clock #authDate { font-size: 1.15rem; font-weight: 500; color: rgba(255,255,255,0.7); }
.auth-meta__dot { color: rgba(255,255,255,0.4); font-size: 0.9rem; }


.auth-hero__foot {
  margin: 40px 0 0;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
}

/* ─────────── RIGHT: FORM PANEL ─────────── */
.auth-panel {
  position: relative;
  background: var(--a-panel-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 56px);
}
.auth-panel__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.1rem;
  margin: 0 0 4px;
  color: var(--a-text);
}
.auth-panel__sub { font-size: 0.92rem; color: var(--a-muted); margin: 0; }
.auth-panel__accent {
  display: block;
  width: 46px; height: 3px;
  border-radius: 3px;
  background: var(--a-blue-500);
  margin: 16px 0 26px;
}

/* Form */
.login-card { display: flex; flex-direction: column; }

.form-alert {
  font-size: 0.85rem;
  text-align: center;
  background: rgba(179, 67, 63, 0.10);
  color: #b3433f;
  border: 1px solid rgba(179, 67, 63, 0.25);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin: 0 0 16px;
}

.field { margin-bottom: 16px; display: flex; flex-direction: column; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--a-text); margin-bottom: 7px; }
.field__control {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--a-input-bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  transition: border-color 200ms var(--ease-out), background 200ms, box-shadow 200ms;
}
.field__control:focus-within {
  background: var(--a-card-bg);
  border-color: var(--a-blue-500);
  box-shadow: 0 0 0 4px rgba(59,125,216,0.15);
}
.field__icon { width: 18px; height: 18px; margin-left: 14px; color: var(--a-muted); flex-shrink: 0; }
.field__control input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 13px 12px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--a-text);
}
.field__toggle {
  background: none; border: none; cursor: pointer;
  color: var(--a-muted); padding: 8px 12px; display: flex;
  transition: color 180ms;
}
.field__toggle:hover, .field__toggle.is-active { color: var(--a-blue-700); }
.field__toggle svg { width: 18px; height: 18px; }
.field.is-invalid .field__control { border-color: #b3433f; }
.field__error { font-size: 0.76rem; color: #b3433f; margin-top: 5px; min-height: 1em; }

/* Remember / forgot row */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 20px;
}
.auth-row .forgot-link { margin-left: auto; }
.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--a-text);
  cursor: pointer;
  user-select: none;
}
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check__box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--a-gray-300);
  background: var(--a-card-bg);
  display: grid; place-items: center;
  transition: background 160ms, border-color 160ms;
}
.auth-check__box::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform 160ms var(--ease-out);
  margin-top: -2px;
}
.auth-check input:checked + .auth-check__box {
  background: var(--a-blue-500);
  border-color: var(--a-blue-500);
}
.auth-check input:checked + .auth-check__box::after { transform: rotate(-45deg) scale(1); }
.auth-check input:focus-visible + .auth-check__box { box-shadow: 0 0 0 3px rgba(59,125,216,0.25); }

.forgot-link {
  font-size: 0.84rem;
  color: var(--a-muted);
  font-weight: 500;
  cursor: default;
}

/* Buttons */
.btn {
  position: relative;
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: opacity 150ms ease;
}
.btn:active { opacity: 0.9; }
.btn:focus-visible { outline: 3px solid rgba(59,125,216,0.35); outline-offset: 2px; }

.btn--primary {
  background: var(--a-blue-600);
  color: #fff;
}
.btn--primary:hover { opacity: 0.92; }
.btn__arrow { width: 18px; height: 18px; }
.btn__spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  display: none;
  animation: aSpin 700ms linear infinite;
}
.btn.is-loading .btn__label { opacity: 0.6; }
.btn.is-loading .btn__arrow { display: none; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes aSpin { to { transform: rotate(360deg); } }

.auth-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 0;
  font-size: 0.78rem;
  color: var(--a-muted);
}
.auth-secure svg { width: 16px; height: 16px; color: var(--a-blue-500); }

/* Shake (triggered by script.js on .login-card) */
.login-card.shake {
  opacity: 1;
  animation: aShake 400ms var(--ease-out);
}
@keyframes aShake {
  10%,90% { transform: translateX(-8px); }
  20%,80% { transform: translateX(10px); }
  30%,50%,70% { transform: translateX(-24px); }
  40%,60% { transform: translateX(24px); }
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 940px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { min-height: 40vh; }
  .auth-hero__copy { margin-top: auto; padding: 40px 0; }  /* back to bottom-anchored, not centered */
}
@media (max-width: 480px) {
  .auth-hero__inner { padding: 26px; }
  .auth-panel { padding: 34px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel__inner > *,
  .login-card.shake,
  .btn__spinner { animation: none !important; }
  .auth-panel__inner > * { opacity: 1; transform: none; }
}

.success-mono {
  text-align: center;
  transform: scale(0.85);
  transition: transform 400ms var(--ease-out);
}
.success-overlay.is-visible .success-mono { transform: scale(1); }
.success-mono__logo {
  width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 6px 24px rgba(59,125,216,0.55));
  opacity: 0;
  transform: scale(0.6);
  animation: logoPop 700ms var(--ease-out) 200ms forwards;
}
@keyframes logoPop {
  0%   { opacity: 0; transform: scale(0.6); }
  70%  { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.success-mono__text {
  margin: 18px 0 0;
  color: #fff;
  font-family: 'Europa Grotesk SH', var(--font-sans);
  font-size: 3rem;        /* was 2rem — bigger */
  font-weight: 700;
  opacity: 0;
  animation: fadeUp 450ms var(--ease-out) 1150ms forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .success-mono__logo { animation-duration: 1ms; animation-delay: 0ms; opacity: 1; transform: none; }
  .success-mono__text { animation-delay: 100ms; }
}
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(11, 27, 48, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}
.success-overlay.is-visible { opacity: 1; }

/* Smooth page fade-out before redirecting to the dashboard */
body.bb-auth { transition: opacity 1300ms var(--ease-out); }
body.bb-auth.page-leaving { opacity: 0; }

/* Photo bleeding across the seam as a smoky shadow overlay */
.auth-panel { position: relative; overflow: hidden; }
.auth-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(to right, rgba(11, 27, 48, 0.55), rgba(11, 27, 48, 0)),
    url('../images/lobby.jpg') left center / cover no-repeat;
  opacity: 0.20;
  filter: blur(2px);
  -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, transparent 100%);
}